This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
Pie- and Polar-area- charts don't get the correct onClick function #65
Labels
bug
Something isn't working
Describe the bug
When using pie or polar area chart, the wrong label-onclick function is wired up.
The global one thinks each label corresponds to one dataset. This is the case for all charts but pie and polar area.
This means a change in the js code. I will open a pull request soon.
Which Blazor project type is your bug related to?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This part of the dataset should be hidden.
Code example
Literally any pie or polar area charts including the examples we have in our app.
Additional information
This kind of stuff seems to only be able to be discovered by looking at the chart.js source (e.g. from here or just prettify the minified version in the browser).
There is also an issue with the function that generates labels. There was an issue for that in the original repo (here) which was "fixed" with this PR. However this PR just removes the fallbacks which makes it work but it's not ideal and might actually introduce bugs. I adapted the PR when I first started working on the library that's why we didn't see the issue. You need to do almost the exact samething for generateLabels as well as for onClick and it's actually also the same charts (pie and polar-area). I might do this in the same PR or in another one.
The text was updated successfully, but these errors were encountered: