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

link jsfiddle

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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -