chart.js - ChartJS:align zeros on chart with multi axes -
how align zeros on chart multi axes, if there both positive , negative values in dataset?
i want zeroes on same line.
i dont this: graph image
new chart(canvas, { type: 'line', data: { labels: ['1', '2', '3', '4', '5'], datasets: [{ label: 'a', yaxisid: 'a', data: [-10, 96, 84, 76, 69] }, { label: 'b', yaxisid: 'b', data: [-2, 3, 5, 2, 3] }] }, options: { scales: { yaxes: [{ id: 'a', type: 'linear', position: 'left', }, { id: 'b', type: 'linear', position: 'right', }] } } });
actualy, example on official web page has same problem. looks messy.
Comments
Post a Comment