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:
parent
3a79a7cf85
commit
5807f062cd
@ -36,6 +36,7 @@ beestat.component.chart.prototype.decorate_ = function(parent) {
|
|||||||
options.yAxis = this.get_options_yAxis_();
|
options.yAxis = this.get_options_yAxis_();
|
||||||
options.series = this.get_options_series_();
|
options.series = this.get_options_series_();
|
||||||
options.tooltip = this.get_options_tooltip_();
|
options.tooltip = this.get_options_tooltip_();
|
||||||
|
options.boost = this.get_options_boost_();
|
||||||
|
|
||||||
options.chart.renderTo = parent[0];
|
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.
|
* Get whether or not the tooltip should be docked.
|
||||||
*
|
*
|
||||||
|
@ -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() {
|
beestat.component.chart.runtime_sensor_detail_temperature.prototype.get_options_chart_marginLeft_ = function() {
|
||||||
return 45;
|
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;
|
||||||
|
};
|
||||||
|
@ -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() {
|
beestat.component.chart.runtime_thermostat_detail_temperature.prototype.get_options_chart_height_ = function() {
|
||||||
return 350;
|
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;
|
||||||
|
};
|
||||||
|
@ -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/highcharts-more.js"></script>' . PHP_EOL;
|
||||||
echo '<script src="/js/lib/highcharts/exporting.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/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/threejs/threejs.js"></script>' . PHP_EOL;
|
||||||
echo '<script src="/js/lib/suncalc/suncalc.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;
|
echo '<script src="/js/lib/clipper/clipper.js"></script>' . PHP_EOL;
|
||||||
|
17
js/lib/highcharts/boost.js
Normal file
17
js/lib/highcharts/boost.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user