Overview – Empty / Null Data Points in Chart

Empty or Null dataPoints are points with no Y value. These are used in cases where values are not available for a specific x value. In cases of charts that require axis (line, area, bar, etc), null dataPoints introduce an empty space or gap and in case of other chart types (pie, doughnut) only labels show up at corresponding position. Empty dataPoints are sometimes referred to as missing dataPoints. Below are some of the examples for empty / null dataPoints.


Note
  • You can change this behavior to draw a line wherever null dataPoints are present by setting connectNullData to true.
  • You can further modify the line dashtype using null-dataLineDashType.

Line Chart with null / empty data point.

Note that the line breaks at the point where empty data point is present and they don’t appear in the toolTip

Try it Yourself by Editing the Code below.



Line Chart with connecting lines when there are null-data-points.

Note that the line breaks are replaced with dotted line at the point where empty data point is present.

Try it Yourself by Editing the Code below.



Spline Area Chart with Missing Data Point

Try changing the chart type to any of the other supported chart type to see how they behave.

Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 10

  1. Pingback: CanvasJS Version 1.4 Beta with StripLines, Legend Events & Empty Data Points in Chart | CanvasJS

  2. Hi, my graph is Date and time Axis, but when i have interval
    between the data, i would like empty data point between two points.

    the way this the line there is not points in that interval
    getting bad viewing.

    Thanks!

  3. HI,

    Facing deadline of delivery. Please assist ASAP. When the data points are broken or contains null, I dont want the chart to look broken. It needs to continue from its previous point. So that the line looks continuous. Is that possible? Please share a fiddle if you already have examples.

    Please help asap.

    Thank you,
    Pruthvi

  4. Facing deadline of delivery. Please assist ASAP. When the data points are broken or contains null, I dont want the chart to look broken. It needs to continue from its previous point. So that the line looks continuous. Is that possible? Please share a fiddle if you already have examples.

    Please help asap.

    Thank you,
    Pruthvi

  5. I don’t want to show null data in candle stick chart.. What is the best solution to not include that data in chart and continues from last data ??

    • Mark,

      Candlestick charts are rendered without null dataPoints and seems to be continuous. Pictorial representation or jsfiddle will help us understand your requirement better and help you out.

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.