[Chartjs]-Chart.js : scaleStartValue from highest to lowest

1👍

There’s no support for inverting the y-axis in chartjs:
https://github.com/nnnick/Chart.js/issues/579

You can fake it by inverting your data set (although axis labels won’t match up):

var inverted = [8, 8, 9, 7, 7, 7, 5, 4],
    max = Math.max.apply(Math, inverted);

inverted.forEach(function(val, idx) {
    inverted[idx] = max - val;
});

Fiddle: http://jsfiddle.net/az2u51gj/

Leave a comment