Commit 6ffb1172 authored by edcartre's avatar edcartre

Allow datum index to be passed as a third parameter to the data labels format function

parent 4fcad88e
......@@ -3075,7 +3075,7 @@
.style("fill", function (d) { return $$.color(d); })
.style("fill-opacity", 0);
$$.mainText
.text(function (d) { return $$.formatByAxisId($$.getAxisId(d.id))(d.value, d.id); });
.text(function (d, i) { return $$.formatByAxisId($$.getAxisId(d.id))(d.value, d.id, i); });
$$.mainText.exit()
.transition().duration(durationForExit)
.style('fill-opacity', 0)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,7 +32,7 @@ c3_chart_internal_fn.redrawText = function (durationForExit) {
.style("fill", function (d) { return $$.color(d); })
.style("fill-opacity", 0);
$$.mainText
.text(function (d) { return $$.formatByAxisId($$.getAxisId(d.id))(d.value, d.id); });
.text(function (d, i) { return $$.formatByAxisId($$.getAxisId(d.id))(d.value, d.id, i); });
$$.mainText.exit()
.transition().duration(durationForExit)
.style('fill-opacity', 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment