You must be logged in to post your query.
Home › Forums › Chart Support › Date scaling Axis
Hi,
in my stacked column chart i need a cleaner formating / scaling. The bars should only have a with by 1 day / date or with other words, on axis a date should only appear once.
<img src="<img src=”https://i.ibb.co/y8j9rMj/Unbenannt.png” alt=”Unbenannt” border=”0″ />” alt=”Image” />
axisX:{ labelFontFamily: font, margin: 10, labelFormatter: function (e) { return CanvasJS.formatDate( e.value, “DD MMM YYYY”); }, },
dataPoints: Array(2) 0: x: Wed Apr 29 2020 02:00:00 GMT+0200 (Mitteleuropäische Sommerzeit) y: 1 1: x: Fri May 01 2020 02:00:00 GMT+0200 (Mitteleuropäische Sommerzeit) y: 1
And how can i show the Date in Tooltip of the bar?
@mwick,
You can set the axisX intervalType as ‘day’ and interval as 1 to achieve your requirement. For formatting the date and time values in toolTip you can set xValueFormatString as per your scenario.
If you are still facing issue, kindly create a JSFiddle reproducing the issue you are facing and share it with us so that we can look into the chart options being used, understand the scenario better and help you resolve.
— Shashi Ranjan Team CanvasJS
Thank you!
You must be logged in to reply to this topic. Login/Register