Home Forums Chart Support How to show the time and date on xAxis Reply To: How to show the time and date on xAxis

#34954

@kodian,

Axis labels are not rendered for every dataPoint instead its rendered at every interval. However, if you like to show label for every dataPoint, you can use label property instead of x-value as shown in the below code snippet –

{label: new Date(2015, 01, 1, 11, 30, 0), y: 26},
{label: new Date(2015, 01, 2, 11, 30, 0), y: 38},
{label: new Date(2015, 01, 3, 11, 30, 0), y: 43},
{label: new Date(2015, 01, 4, 11, 30, 0), y: 29},

Also, please take a look at this JSFiddle for an example to display date-time using label property.

Displaying date-time using label property

___________
Indranil Deo
Team CanvasJS