I am trying to add a double Y-axis in Chart.js for two dataset comparisons. I\'m currently using Leigh Quince\'s LineBar extension which was the answer found here: Chart.js how
To show a Line Chart with two Y axis, @khertan made a pull request to add this feature >> https://github.com/nnnick/Chart.js/pull/1355
You can grab the modified Chart.js file here >> https://github.com/khertan/Chart.js/tree/9edcc71f97361bb45c8fe93d07acb1917c2b4807
You'll only need to add the option to your options
variable:
var options = {
...
scaleUse2Y: true,
...
};
And then instantiate a normal Line chart:
var chart = new Chart(ctx).Line(data, options);
Problem is that if you're using an extension like StackedBar, for example, it will probably break... That must be the reason why it hasn't been merged with master's branch of Chart.js yet. Patience for the 2.0 version release.