Home › forums › Using CanvasJS › Hide datapoints programmatically › Reply To: Hide datapoints programmatically
You are trying to update visible property directly and not through chart-options. Updating chart options should work fine in this case. Can you kindly update your code to chart.options.data[i].visible = false; instead of chart.data[i].visible = false; and the same in ShowAll() aswell.
chart.options.data[i].visible = false;
chart.data[i].visible = false;
If this doesn’t solve your issue, kindly create jsfiddle reproducing the issue, so that we can look in to your code, understand it better and help you out.