Home Forums Chart Support Make datapoint null values not render or invisible Reply To: Make datapoint null values not render or invisible

#14735

@ray,

You can remove the dataPoints with null value as shown in the code snippet below –

for(var i = 0; i < chart.options.data.length; i++) {
  for(var j = 0; j < chart.options.data[i].dataPoints.length; j++) {
    if(chart.options.data[i].dataPoints[j].y === null)
      chart.options.data[i].dataPoints.splice(j, 1);
  }
}

Please take a look at this JSFiddle for a working example.

Remove dataPoint with Null value

___
Suyash Singh
Team CanvasJS