Home Forums Chart Support Time showing issue in Combination of Range and line chart

Time showing issue in Combination of Range and line chart

Viewing 3 posts - 1 through 3 (of 3 total)
  • #33969

    How to set correct time along with date in x axis as a value ?

    #33978

    https://jsfiddle.net/rh9kua8j/ My open issue.
    After formatting with valueFormatString also, time not showing correctly

    #34013

    @pragyasarkar,

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

    data: [{				
      dataPoints: [
        { label: CanvasJS.formatDate(new Date('2021-04-09T20:05:25.000+05:30'), "DD-MM-YY HH:mm"), y: 71 },
        { label: CanvasJS.formatDate(new Date('2021-04-08T08:05:25.000+05:30'), "DD-MM-YY HH:mm"), y: 55 },
        { label: CanvasJS.formatDate(new Date('2021-04-07T20:05:25.000+05:30'), "DD-MM-YY HH:mm"), y: 65 },
        { label: CanvasJS.formatDate(new Date('2021-04-06T20:05:25.000+05:30'), "DD-MM-YY HH:mm"), y: 95 },
      ]
    }]

    Also, please take a look at this JSFiddle for complete working code.

    Labels used for displaying date on axisX

    ___________
    Indranil Deo
    Team CanvasJS

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.