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
I pushed a "fake data with year f.ex 1930" to the dataset and used ticks callback to change if the index is 0 with custom value but then it start to display all the years between like this: (which i don`t want).
Then i changed the "fake data year to 2016" and it looks like this :
I want something similar to this but the starting point should be as i showed in the first screenshot.
Would appreciate any tips how i can achieve that.
Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes data, options and plugins to Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues
Activity
Arantiryo commentedon May 14, 2022
Hi @erkanisuf 👋
Have you considered passing labels separately like in this example?
dangreen commentedon Nov 30, 2026
Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes
data,optionsandpluginsto Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues