-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add index to legendItem interface #10436
Conversation
…rts. Make datasetIndex optional since the before named charts dont include it.
Size Change: +73 B (0%) Total Size: 257 kB
ℹ️ View Unchanged
|
I just noticed that I worked within the chart.js repo itself. I'm sorry. Used that when using the web editor it would automatically create a branch in my fork since I had no rights to do it within the normal repo. I will take more care next time that the changes are made withing my fork of the project so this does not happen again, sorry. |
It's ok, just remove the branches after merge to keep it clean.. |
Test is failing since the legendItem should not be allowed to be created without a datasetIndex. I think that the best and cleanest approach is to add a baseLegendItem interface and a labelLegendItem interface, then let the current legendItem and doughnutLegendItem interfaces extend the base both with their index/datasetIndex mandatory. So it does not become a breaking change. Or do we want to keep the typings more simple and remove the test that datasetIndex needs to be mandatory? |
hmmm, I think if we removed the mandatory |
…unction for legend
resolves #10319