1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00
beestat/js/component/metric/runtime_per_degree_day.js
Jon Ziebell 6d7b4ff3f5 Metrics
There's no description for a commit with changes to 65 files.
2021-01-27 20:49:27 -05:00

51 lines
1.4 KiB
JavaScript

/**
* Runtime per heating degree day metric.
*
* @param {number} thermostat_id The thermostat group.
*/
beestat.component.metric.runtime_per_degree_day = function(thermostat_id) {
this.thermostat_id_ = thermostat_id;
beestat.component.metric.apply(this, arguments);
};
beestat.extend(beestat.component.metric.runtime_per_degree_day, beestat.component.metric);
beestat.component.metric.runtime_per_degree_day.prototype.parent_metric_name_ = 'runtime_per_degree_day';
/**
* Get the units for this metric.
*
* @return {string} The units for this metric.
*/
beestat.component.metric.runtime_per_degree_day.prototype.get_units_ = function() {
return 'm';
};
/**
* Get the title of this metric.
*
* @return {string} The title of this metric.
*/
beestat.component.metric.runtime_per_degree_day.prototype.get_title_ = function() {
return beestat.series['compressor_' + this.child_metric_name_].name;
};
/**
* Get the color of this metric.
*
* @return {string} The color of this metric.
*/
beestat.component.metric.runtime_per_degree_day.prototype.get_color_ = function() {
return beestat.series['compressor_' + this.child_metric_name_].color;
};
/**
* Get max cutoff. This is used to set the chart min to max(median - 2 *
* stddev, max cutoff).
*
* @return {object} The cutoff value.
*/
beestat.component.metric.runtime_per_degree_day.prototype.get_cutoff_min_ = function() {
return 0;
};