c3 - Scatter plot size on "tooltip" -
how to retrieve radius(or size) of scatter plot on tooltip.
r : function(d) { if (d.value != null) { var size = datajson[k++]["total"]; return size; }
i have done this..so tooltip should show size when point on bubble. how achieve this?
thanks
you can add size d object
r: function (d) { if (d.value != null) { var size = datajson[k++]["total"]; d.size = size; return size; } }
and retrieve when show tooltip
tooltip: { contents: function (d) { if (d[0].value != null) { return d[0].size; } } },
fiddle - http://jsfiddle.net/f0cotcqp/
Comments
Post a Comment