Home Forums Chart Support Multi data series with no data

Multi data series with no data

Viewing 4 posts - 1 through 4 (of 4 total)
  • #25873

    Hello everyone,

    I have a multi data-series spline like this.
    everything is just fine except for user 2 and 3.
    in normal behavior, the chart connects “1-1-2019” and “5-1-2019”.
    is there any way to set “2-1-2019″,”3-1-2019″,”4-1-2019” to “y:0” for user 3 without getting dirty with backend codes?

    [{
    name:user1,
    datapoint:[
    {x:1-1-2019,y:10},
    {x:2-1-2019,y:11},
    {x:3-1-2019,y:12},
    {x:4-1-2019,y:13},
    {x:5-1-2019,y:14}
    ]},
    {
    name:user2,
    datapoint:[
    {x:1-1-2019,y:16},
    {x:3-1-2019,y:17},
    {x:4-1-2019,y:1},
    {x:5-1-2019,y:2}
    ]},
    {
    name:user3,
    datapoint:[
    {x:1-1-2019,y:3},
    {x:5-1-2019,y:4}
    ]
    }]

    #25891

    @ali136,

    Please take a look at this JSFiddle.

    —–
    Manoj Mohan
    Team CanvasJS

    #25948

    Thanks @monaj mohsen
    doing it in the backend is easier. my chart is more complex than that.
    I was looking for some kind of built-in option in canvasjs.
    If I’m sure there is no such option, I will do it in the backend.

    thank you

    #25958

    @ali136,

    Sorry, there is no feature built-in to add missing datapoints. CanvasJS just renders the chart with datapoints that you have passed in chart-options and it doesn’t add any extra datapoints. You can do it in backend – as you have mentioned.

    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.