You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @doekenorg!
You can use the id property (or the x property as the default for xAxisKey if not configured) as the index to the label in the labels array, like this: https://codepen.io/adrianbrs/pen/wBBGwxq
I'm not sure if it should accept an array as the category name inside the data object, but I'd love to fix that if that's the case.
For now, I think this workaround is sufficient, and your example might be a good feature request if it's not a bug.
Expected behavior
When datasets contain data objects with keys, the configured label key (
xAxisKey
) should also allow for multiple lines using the array notation.Current behavior
When parsing data objects, labels on that object that are split into multiple lines using the
array
notation are not recognized.I can enable the correct labels by adding a
labels
array. This will show the label, but the value for it is still not displayed.Reproducible sample
https://codepen.io/doekenorg/pen/raaNPvM
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v4.4.9
Browser name and version
No response
Link to your project
No response
The text was updated successfully, but these errors were encountered: