</div>
<script>
var randomScalingFactor = function() {
- return Math.round(Math.random() * 100 * (Math.random() > 0.5 ? -1 : 1));
+ return Math.round(Math.random() * 100);
+ //return 0;
};
var randomColorFactor = function() {
return Math.round(Math.random() * 255);
scaleLabel: {
show: true,
labelString: 'Value'
+ },
+ ticks: {
+ suggestedMin: -10,
+ suggestedMax: 250,
}
}]
}
// move the botttom down to 0
this.min = 0;
}
- }
+ }
+
+ if (this.options.ticks.suggestedMin) {
+ this.min = Math.min(this.min, this.options.ticks.suggestedMin);
+ }
+
+ if (this.options.ticks.suggestedMax) {
+ this.max = Math.max(this.max, this.options.ticks.suggestedMax);
+ }
if (this.min === this.max) {
this.min--;