Closed Pedram-Parsian closed 3 years ago
You need to create two different y-axes. See the Chart.js docs
Could you please provide a complete working example? I tried adding yAxisID: "candles"
and yAxisID: "bars"
to "candlestick" and "bar" respectively, and also the following options:
options: {
scales: {
yAxes: [{
id: 'candles',
position: 'left',
}, {
id: 'bars',
type: 'linear',
position: 'right',
}]
}
}
but still no luck (the "bars" are not yet visible).
I want to build a mixed chart with bar chart, essentially adding "volumes" (in stock market) as bars sitting in bottom of chart, to make something like this:
Based on the docs, I tried the below code, but it didn't work as expected.
Is there any workaround to this issue? and BTW, how can I handle the scaling issue? Since "bar" values should always start at the bottom of page, and not directly comparable to "candles" .