Skip to content
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

ChartMeta interface missing properties #9422

Closed
gregoroque opened this issue Jul 15, 2021 · 3 comments · Fixed by #9432
Closed

ChartMeta interface missing properties #9422

gregoroque opened this issue Jul 15, 2021 · 3 comments · Fixed by #9432
Labels
type: types Typescript type changes
Milestone

Comments

@gregoroque
Copy link

Expected Behavior

  • ChartMeta should contain all properties that getChartMeta return

Current Behavior

getDatasetMeta(datasetIndex: number): ChartMeta;

  • function getDatasetMeta retruns more properties than exist in interface ChartMeta e.g. 'Total'.

Possible Solution

expand ChartMeta definition to include all possible properties

Steps to Reproduce

Context

Environment

  • Chart.js version: 3.4.1
  • Browser name and version: doesn't matter
  • Link to your project: not shared
@kurkle kurkle added type: types Typescript type changes and removed type: bug labels Jul 15, 2021
@kurkle
Copy link
Member

kurkle commented Jul 15, 2021

total is only present for doughnut/pie charts

@gregoroque
Copy link
Author

@kurkle thanks, forgot to mention that

@etimberg
Copy link
Member

This one might be quite complex to type since it's per dataset. I assume we'd need something similar to ChartDataset with a DeepPartial across the meta type per dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: types Typescript type changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants