allow charts to have Y-axis min and max specified

This commit is contained in:
Lee Lawlor
2014-04-13 14:42:03 -04:00
parent dd2007de4c
commit f317d06653
5 changed files with 30 additions and 22 deletions

View File

@ -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>

View File

@ -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' %>