I am using dojo Chart2D to plot a graph having milliseconds values along the X axis. To display the minor tick values I want to convert the milliseconds value to hh:mm:ss:msec format. I can do it easily overriding tickFormat() method in D3. But I am stuck here with Chart2D.
While adding the axis to the chart, we can use the attribute "labelFunc" which should be function taking 3 arguments:
1) text
is the already pre-formatted text. Pre-formatting is done using dojo/number
is available, Date.toFixed
otherwise.
2) value
is the raw axis value.
3) precision
is the requested precision to be applied.
and returns the label. eg:
chart.addAxis("x", {
...,
labelFunc: function(text, value, precision) {
return "axisLabel";
}
});