Set the step size to the metrics places. Fixes #2012

This commit is contained in:
James Brooks 2016-07-28 15:17:20 -04:00
parent c1d8203602
commit 5b1dd8ad00

View File

@ -25,7 +25,7 @@
</div>
<div class="row">
<div class="col-xs-12">
<canvas id="metric-{{ $metric->id }}" data-metric-name="{{ $metric->name }}" data-metric-suffix="{{ $metric->suffix }}" data-metric-id="{{ $metric->id }}" data-metric-group="{{ $metric->view_name }}" height="160" width="600"></canvas>
<canvas id="metric-{{ $metric->id }}" data-metric-name="{{ $metric->name }}" data-metric-suffix="{{ $metric->suffix }}" data-metric-id="{{ $metric->id }}" data-metric-group="{{ $metric->view_name }}" data-metric-precision="{{ $metric->places }}" height="160" width="600"></canvas>
</div>
</div>
</li>
@ -97,6 +97,7 @@
ticks: {
beginAtZero: true,
suggestedMax: 0.1,
fixedStepSize: result.data.metric.places,
callback: function(tickValue, index, ticks) {
var delta = ticks[1] - ticks[0];