Open Truiteseche opened 6 months ago
As a workaround for now you can pass your data array as a 2d array to set the base as you want:
data: [
[2, 12],
[5, 19],
[3, 7],
[10, 5],
[15, 8],
[7, 3]
]
Indeed it works! In fact, it is a better solution to my problem, thanks!
I let the issue open because there is still the problem with base
Expected behavior
The
base
dataset propertybar
charts for should be indexable, which means that each bar should have its own base Reminder: according to the docs, base is:Current behavior
All bars have the same base (the first value of the array if we use an array) And it doesn't work either using the scriptable way since the function is also called once
Reproducible sample
https://codepen.io/Truite-Seche/pen/MWxayZm
Optional extra steps/info to reproduce
Put an array as
base
on abar
chartPossible solution
Make
base
scriptable and indexable, but this is theoretically already the case according to the docs.Context
No response
chart.js version
v4.4.1
Browser name and version
Microsoft Edge (Chromium) v120.0.2210.91
Link to your project
No response