Set the y axis scale manually in the histogram using angular -chart.js

I am creating a histogram using angular -chart.js (0.9.0). The version of Chart.js used is 1.0.2.

In my map, unfortunately, the range of values ​​is very wide. The highest value is 90,000 s and the lowest values ​​are 4 or 40 seconds. Due to this range, the chart does not appear as we would like. For example, in the table below, the largest value is 42,000 and the lowest is 70.

enter image description here

I am wondering if we can set the Y axis scales manually in the Math.pow values. If the y axis scale is set to 10, 100, 1000, 10000, 100000, and so on. Thus, I think I can correctly cover such high-range data in my chart.

, . , , 0, 100, 200, 300 ..

            $scope.majorOptions = {
                responsive: false,
                maintainAspectRatio: true,
                scaleOverride: true,
                scaleSteps: 10,
                scaleStepWidth: Math.pow(10,2),
                scaleStartValue: 0
            };  

, y 10?

- , , .

.

+4

All Articles