There is a chart generated with billboard.js and I want to update the min/max values of Y-axis.
For doing this, I wrote in html:
<span>
Max:</br>
<input ng-change="$ctrl.updateY()" ng-model="$ctrl.maxValue"></br>
Min:</br>
<input ng-change="$ctrl.updateY()" ng-model="$ctrl.minValue"></br>
</span>
And in JS:
updateY() {
this.lineView.chart.axis.max({y: this.maxValue});
this.lineView.chart.axis.min({y: this.minValue});
}
It works fine for the min
value but for max
it doesn't.
For example if I set the maximum value to 100
, on the Y-axis it is 1000
.
For 1000
it is 100000
.
For 10000
it is 1000000
. I guess it adds an extra zero but didn't find out how and where. For min
everything it's working fine. Is this a bug?
Any ideas?