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
Sorry for a late reply. You can create a vertical line chart by using Line component and setting options property indexAxis to 'y'.
To permanently display data labels I suggest using chartjs-plugin-datalabels. Although it might be tricky to display them in a single column like on the suggested design. Here's a code sandbox to try out different styling options.
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 4, 2022
Hi @sterkhedkar 👋
Sorry for a late reply. You can create a vertical line chart by using
Linecomponent and settingoptionspropertyindexAxisto'y'.To permanently display data labels I suggest using chartjs-plugin-datalabels. Although it might be tricky to display them in a single column like on the suggested design. Here's a code sandbox to try out different styling options.
Hope that helps!
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