1
0
mirror of https://github.com/beestat/app.git synced 2025-06-23 15:30:43 -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() { beestat.component.chart.runtime_thermostat_summary.prototype.get_options_yAxis_ = function() {
var y_max_hours; var y_max_hours;
var tick_interval; var tick_interval;
if (beestat.setting('runtime_thermostat_summary_smart_scale') === true) {
switch (beestat.setting('runtime_thermostat_summary_group_by')) { switch (beestat.setting('runtime_thermostat_summary_group_by')) {
case 'year': case 'year':
y_max_hours = 8760; y_max_hours = 8760;
@ -149,12 +150,13 @@ beestat.component.chart.runtime_thermostat_summary.prototype.get_options_yAxis_
tick_interval = 6; tick_interval = 6;
break; break;
} }
}
return [ return [
{ {
'alignTicks': false, 'alignTicks': false,
'min': 0, 'min': 0,
'softMax': (beestat.setting('runtime_thermostat_summary_smart_scale') === true) ? y_max_hours : undefined, 'softMax': y_max_hours,
'tickInterval': tick_interval, 'tickInterval': tick_interval,
'reversedStacks': false, 'reversedStacks': false,
'gridLineColor': beestat.style.color.bluegray.light, 'gridLineColor': beestat.style.color.bluegray.light,