Bug: initial status of chart.getDatasetMeta(index).hidden is always null

The initial hidden status of a dataset is always null

 datasets: [{
       data: [10, 15, 30, 40],
       hidden: true    
    }]

Go to:
https://jsfiddle.net/aLw73xaj/

open the console and click on run.

You will see that the initial status null.

Click on the legend to toggle the status and click on the button “log hidden status” to show the new status false in the console.
Repeat this and the status should be back to null.

Change datasets[].hidden to true and repeat the step above.

Expected behavior: chart.getDatasetMeta(index).hidden should be always true or false, but never ever null.

Author: Fantashit

1 thought on “Bug: initial status of chart.getDatasetMeta(index).hidden is always null

  1. chart.getDatasetMeta(index).hidden is an internal and you should not interact with it directly. If you need to know if a dataset is visible, you should call chart.isDatasetVisible(index) instead.

Comments are closed.