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
{{ message }}
Repository navigation
how can I put a scale on the right side for mixed chart type with chartjs 3? also how to reduce scale size #676
I am having the same problem. I want my Y axis on the right and I can't seem to find a way to make it happen.
Did you find a way by any chance? @afshinmoshrefi
Can you try with the below code?
Looks like - 'id' property is no longer used. They are expecting us to name the scale property with the yAxisID used in datasets
yBar: {
ticks: {
// beginAtZero: true, //sets the scale minimum to 0
},
},
},
}}
/>
</div>
One thing I realized is that the property names are quite different than the charts, so you have to find the options you are looking for one by one I guess.
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
SoloNoah commentedon Jun 6, 2021
I am having the same problem. I want my Y axis on the right and I can't seem to find a way to make it happen.
Did you find a way by any chance? @afshinmoshrefi
MNKCrypto commentedon Jul 1, 2021
Can you try with the below code?
Looks like - 'id' property is no longer used. They are expecting us to name the scale property with the yAxisID used in datasets
yBar: { ticks: { // beginAtZero: true, //sets the scale minimum to 0 }, }, }, }} /> </div>AndyyTaylor commentedon Jul 9, 2021
Having this problem too, @MNKCrypto tried your suggestion but no luck
Any other ideas?
Seems the example is broken as well http://reactchartjs.github.io/react-chartjs-2/#/multi-axis-line
AndyyTaylor commentedon Jul 9, 2021
nvm got it still had the keys nested in
yAxeswhich is incorrect, this worksnomikeeper commentedon Aug 16, 2022
For me, setting the options as follows:
worked for me.
The current option is set for mixed charts too ( more accurately, I'm using bar and line mixed charts).
The code I'm using for the mixed chart is:
One thing I realized is that the property names are quite different than the charts, so you have to find the options you are looking for one by one I guess.
Hope this helps you out.
@afshinmoshrefi
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