allow charts to have Y-axis min and max specified
This commit is contained in:
@ -144,6 +144,14 @@
|
||||
<td><%= t(:chart_max) %>: </td>
|
||||
<td><input type="text" class="chart_options<%= index %> shortfield" id="max_<%= index %>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:chart_yaxis_min) %>: </td>
|
||||
<td><input type="text" class="chart_options<%= index %> shortfield" id="yaxismin_<%= index %>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:chart_yaxis_max) %>: </td>
|
||||
<td><input type="text" class="chart_options<%= index %> shortfield" id="yaxismax_<%= index %>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" id="button<%= index %>" value="<%= t(:chart_update) %>" /></td>
|
||||
<td></td>
|
||||
|
@ -149,9 +149,11 @@
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
min: <%= params[:yaxismin].present? ? params[:yaxismin] : 'null '%>,
|
||||
max: <%= params[:yaxismax].present? ? params[:yaxismax] : 'null' %>
|
||||
},
|
||||
exporting: {
|
||||
enabled: <%= (params[:export].present? && params[:export] == 'true') ? 'true' : 'false' %>
|
||||
|
@ -33,6 +33,8 @@
|
||||
<li><b>dynamic</b> (true/false) Make chart update automatically every 15 seconds, default: false (optional)</li>
|
||||
<li><b>step</b> (true/false) Draw chart as a step chart, default: false (optional)</li>
|
||||
<li><b>export</b> (true/false) Show export buttons, so that chart can be saved as an image, default: false (optional)</li>
|
||||
<li><b>yaxismin</b> (decimal) Minimum value of chart's Y-Axis; if blank the value is auto-calculated (optional)</li>
|
||||
<li><b>yaxismax</b> (decimal) Maximum value of chart's Y-Axis; if blank the value is auto-calculated (optional)</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
|
Reference in New Issue
Block a user