1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Trying Highcharts boost module to improve chart performance

This commit is contained in:
Jon Ziebell 2024-05-27 07:38:42 -04:00
parent 3a79a7cf85
commit 5807f062cd
5 changed files with 59 additions and 0 deletions

View File

@ -36,6 +36,7 @@ beestat.component.chart.prototype.decorate_ = function(parent) {
options.yAxis = this.get_options_yAxis_();
options.series = this.get_options_series_();
options.tooltip = this.get_options_tooltip_();
options.boost = this.get_options_boost_();
options.chart.renderTo = parent[0];
@ -684,6 +685,28 @@ beestat.component.chart.prototype.tooltip_formatter_helper_ = function(title, se
}
};
/**
* Get the boost options.
*
* @return {object} The boost options.
*/
beestat.component.chart.prototype.get_options_boost_ = function() {
return {
'enabled': this.get_options_boost_enabled_(),
'useGPUTranslations': true,
'usePreallocated': true
};
};
/**
* Get the boost enabled option.
*
* @return {object} The boost enabled option.
*/
beestat.component.chart.prototype.get_options_boost_enabled_ = function() {
return false;
};
/**
* Get whether or not the tooltip should be docked.
*

View File

@ -314,3 +314,12 @@ beestat.component.chart.runtime_sensor_detail_temperature.prototype.get_options_
beestat.component.chart.runtime_sensor_detail_temperature.prototype.get_options_chart_marginLeft_ = function() {
return 45;
};
/**
* Get the boost enabled option.
*
* @return {object} The boost enabled option.
*/
beestat.component.chart.runtime_sensor_detail_temperature.prototype.get_options_boost_enabled_ = function() {
return true;
};

View File

@ -420,3 +420,12 @@ beestat.component.chart.runtime_thermostat_detail_temperature.prototype.get_opti
beestat.component.chart.runtime_thermostat_detail_temperature.prototype.get_options_chart_height_ = function() {
return 350;
};
/**
* Get the boost enabled option.
*
* @return {object} The boost enabled option.
*/
beestat.component.chart.runtime_thermostat_detail_temperature.prototype.get_options_boost_enabled_ = function() {
return true;
};

View File

@ -18,6 +18,7 @@ if($setting->get('environment') === 'dev' || $setting->get('environment') === 'd
echo '<script src="/js/lib/highcharts/highcharts-more.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/highcharts/exporting.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/highcharts/offline-exporting.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/highcharts/boost.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/threejs/threejs.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/suncalc/suncalc.js"></script>' . PHP_EOL;
echo '<script src="/js/lib/clipper/clipper.js"></script>' . PHP_EOL;

File diff suppressed because one or more lines are too long