Chartjs-Chartjs for Line chart, values on y-axis

0👍

That depends on your data if your data has a maximum number you just

currentDataNumber/MaximumDataNumber * 100 = percentageRelativeToMaximum;

In simple words you should convert your data to percentages. This is possible on a number of ways. If you were to give an example of you data sheet I could i give a better solution.

If it varies you find the highest number in your data. If a new highest number is introduced it wil change the entire graph.

Code in comment:

window.onload = function(){ var ctx = document.getElementById(“canvas”).getContext(“2d”); window.myLine = new Chart(ctx).Line(lineChartData, { scaleOverride : true, scaleSteps : 10, scaleStepWidth : 10, scaleStartValue : 0 }); }

Leave a comment