1
0
mirror of https://github.com/beestat/app.git synced 2025-06-04 06:07:19 -04:00

Fixed #270 - Make Runtime Summary plot scale configurable

This commit is contained in:
Jon Ziebell 2020-06-22 21:27:33 -04:00
parent 53272ec5b0
commit 014e939547

View File

@ -131,6 +131,7 @@ beestat.component.chart.runtime_thermostat_summary.prototype.get_options_series_
beestat.component.chart.runtime_thermostat_summary.prototype.get_options_yAxis_ = function() {
var y_max_hours;
var tick_interval;
if (beestat.setting('runtime_thermostat_summary_smart_scale') === true) {
switch (beestat.setting('runtime_thermostat_summary_group_by')) {
case 'year':
y_max_hours = 8760;
@ -149,12 +150,13 @@ beestat.component.chart.runtime_thermostat_summary.prototype.get_options_yAxis_
tick_interval = 6;
break;
}
}
return [
{
'alignTicks': false,
'min': 0,
'softMax': (beestat.setting('runtime_thermostat_summary_smart_scale') === true) ? y_max_hours : undefined,
'softMax': y_max_hours,
'tickInterval': tick_interval,
'reversedStacks': false,
'gridLineColor': beestat.style.color.bluegray.light,