-
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
Chart data type is incorrect in 4.1.2 #11064
Comments
Happend in #10963 |
@tleunen Hi. It's not a bug, it is expected behavior. You should be able to change data in runtime. Please see the PR description that @LeeLenaleee mentioned. |
To be honest I think that this behaviour is more unwanted as the binding of the chart instance 🤔 |
Also another issue got posted about this (see above linked issue), in my oppinion it would be better to revert the changes and see if we can solve it another way because this way of working seems way more likely to me as having a runtime change and the downside of dealing with that |
I've returned to version 4.0.1 until a solution has been decided. |
A revert probably makes sense unless we can find a way to fix it. @dangreen thoughts? |
@etimberg I've made the PR |
Expected behavior
The types for the Chart object has
data: ChartData
, but it should bedata: ChartData<TType, TData, TLabel>;
instead to have the dataset typed properly within the data. Otherwise it's the default types fromDefaultDataPoint<TType>
Current behavior
Reproducible sample
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgYQBYENZwL5wGZQQhwDkAxhrAHQBWAziQNwCwAUGzAJ5gCmK6MHgHNonAGroANgFc+AXkRs4cMgOGiAXHDowowAHZCWrZQDcpsrfukgARjyjHlZCJOgB+LTr2Hj2NhzcfGiYMAAqQXAKIbAAPABEkgY88QA0-IIiUOIWPADaALoAfAGsAPRlcAByEDDAZHxhqHwAIgLoEbxwACYQPHT6JPAYpnwwzXBcvHRwYISmwN083fiExDHhQYFdbTAdkdGUm7x5JN3tJAWMQA
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
4.1.2
Browser name and version
No response
Link to your project
No response
The text was updated successfully, but these errors were encountered: