Chartjs-Change Chartjs financial chart yaxis from left to right

1👍

add position right to the first (default) yAxes object in the options

options: {
    scales: {
        yAxes: [{
        position: 'right'
      }]
    }
  }

EDIT: Seems like chartjs financial is working with v3 of the lib. In v3 you have to edit the axis in a different way:

options: {
  scales: {
    y: {
      position: "right"
    }
  }
}

enter image description here

0👍

scales: {yAxes: [{
display: true,
position: 'right',
ticks: {
 beginAtZero: false,
 max: 2000,
 min: 1000,
 stepSize: 100
}}]}

scales: { yAxes: [{
display: true,
position: 'right',
ticks: {
 beginAtZero: true
},}]}

you can try these two ways, one of the them will work, depends on the your chart.

Leave a comment