Defines how x values must be formatted before they appear on the indexLabel or toolTip. You can format numbers and date time values using this property.
var chart = new CanvasJS.Chart("container", { . . data: [{ xValueFormatString: "Year ####", }, ] . . }); chart.render();
3 Comments
It would be nice if for the presentation of the labels there would be a callback like for the mouse-over. The values here are as dynamic (MB->GB etc) as they would be in the mouseover.
Hi,
Thanks for you suggestion. We’ll consider it for future version.
Hi,
I have the timestamp in nanoseccond eg: “xcol -> 84108058.966620” or “114108058.966620” and I need to change it to HHMM, So I just changed timestamp to “84108058 or 114108058” and then I am using “Array1.push({x:parseInt(xcol),y:parseInt(ycol)});”. By using this “x:parseInt(xcol)”, I get time in format like “841 or 1,141” and I want in format like “841 or 1141” or “8:41 or 11:41” . I cannot use “label:parseInt(xcol)” for this because it change the plot appearance.
Please help in this.
what can we do for this ??