You must be logged in to post your query.
Home › Forums › Chart Support › XAxis Labels with Date only (no timestamp)
Tagged: XAxis Date Formatting
I have a chart I want to show values by day only. But, if the sample is small, the chart auto-magically spreads out to show full timestamp (date + time). I don’t want the time to show ever, only the date. Is there a way to do that other than creating my own XAxis as a ‘label’ type?
@jeffe,
You can use valueFormatString property to define how X-axis labels must be formatted before they appear. Please take a look at this code-snippet for an example on showing only date as the labels,
axisX:{ valueFormatString: "DD-MMM" , },
Kindly, take a look at this JSFiddle for an example on the same.
— Adithya Menon Team CanvasJS
You must be logged in to reply to this topic. Login/Register