You must be logged in to post your query.
Home › Forums › Chart Support › Set Axis X granularity
Hi, Congratulations for this nice work. Please i’d like to set the time in a granularity of 5mins like (11:10:00 11:15:00 …) How can i make it please ?
@uriel,
You can achieve the above requirement by setting the valueFormatString as “hh:mm:ss”, intervalType as “minute” and interval to 5 for Axis X.
____ Shashi Ranjan Team CanvasJS
Thanks Ranjan, I’ve even made it work, with the same solution. the problem now, is that the date format i want to display (‘YYYY-MMM-DD hh:mm:ss’) doesn’t apply< I still come out with the hh:mm:ss. down i post a peace of code:
`var chart = new CanvasJS.Chart(“chartContainer”, { zoomEnabled: true, title: { text: “Nombre de Sites HS” }, axisX: { title: “chart updates every 5 mins”,// + updateInterval / 10000 + ” mins”, intervalType: “minute”, ValueFormatString: “YYYY-MMM-DD hh:mm:ss”, interval: 5 }, axisY:{ suffix: ” “, includeZero: false }, toolTip: { shared: true },`
Thanks for your support
valueFormatString defines how values must be formatted before they appear on Axis X. Changing ValueFormatString to valueFormatString should work fine in your case.
ValueFormatString
valueFormatString
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register