A custom formatter function that returns label to be displayed on axisX.
var chart = new CanvasJS.Chart("container", { . . axisX:{ labelFormatter: function ( e ) { return "x: " + e.value; } }, . . }); chart.render();
e: { // parameter sent to function chart, axis, value, label }
Comments 8
Server Side Technologies |
Front End Technologies |
Contact |
|
---|---|---|---|
ASP.NET MVC Charts | JavaScript Charts | FAQs | |
PHP Charts | jQuery Charts | Sales Enquiries | |
Spring MVC Charts | React Charts | Support Forum | |
JSP Charts | Angular Charts | Careers | |
JavaScript StockCharts | |||
Privacy Policy © fenopix
am trying to plot x-axis labels using labelFormatter from a json object where it consists of date and value.
May I know how to do that ?
I have figured it out
can we fire a click event on labels???
Sorry, events are not supported on axis labels as of now.
Is it possible to give a enter in the string of label for multiple information…?
Zillur, you can set labelMaxWidth to split a string to multiple lines.
Hi
Is there a way to format the label with html, like doing the label with a border or place a where i need
Isaac,
label doesn’t support HTML property, for formatting it plese look into labelFontFamily, labelFontColor, labelFontSize, labelFontWeight, labelFontStyle.
And as of now label does’t support border.