Bug: initial status of chart.getDatasetMeta(index).hidden is always null
See original GitHub issueThe 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
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
API | Chart.js
Returns an array of all the dataset meta's in the order that they are drawn on the canvas that are not hidden. const...
Read more >Chart.js not able to re-set data - Stack Overflow
When I now try to re-set the data it always gives me: ERROR TypeError: "me.getDatasetMeta(...).controller is null" . So my first thought was ......
Read more >jQuery Charts.js- combined bar and line chart - Plunker
getDatasetMeta (i); meta.data[index].hidden = !meta.data[index].hidden; } chart.update(); } }, // Need to override these to give a nice default tooltips: ...
Read more >Chart js legend template - Weebly
ceļvedis (balsot par funkcijām) Bug tracker Docs Service status Support JSFiddle un saņemt ... getDatasetMeta(index); meta.hidden = meta.hidden ===null ...
Read more >npmtest-react-chartjs-2 (v0.0.1)
getDatasetMeta (i); meta.data[index].hidden = !meta.data[index].hidden; } chart.update(); } }, // Need to override these to give a nice default tooltips: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 callchart.isDatasetVisible(index)
instead.Closing since this sounds resolved as #4624 was opened for the other parts