mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
parent
39172f8c49
commit
9dc33de49f
@ -56,7 +56,7 @@
|
|||||||
"vaadin-date-picker": "vaadin/vaadin-date-picker#^2.0.0",
|
"vaadin-date-picker": "vaadin/vaadin-date-picker#^2.0.0",
|
||||||
"web-animations-js": "^2.2.5",
|
"web-animations-js": "^2.2.5",
|
||||||
"webcomponentsjs": "^1.0.10",
|
"webcomponentsjs": "^1.0.10",
|
||||||
"chart.js": "~2.7.1",
|
"chart.js": "~2.7.2",
|
||||||
"moment": "^2.20.0",
|
"moment": "^2.20.0",
|
||||||
"chartjs-chart-timeline": "fanthos/chartjs-chart-timeline#^0.1.4",
|
"chartjs-chart-timeline": "fanthos/chartjs-chart-timeline#^0.1.4",
|
||||||
"chartjs-plugin-zoom": "^0.6.3",
|
"chartjs-plugin-zoom": "^0.6.3",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// Use minified(Chart.min.js) version to fix strange color after uglify
|
// Use minified(Chart.min.js) version to fix strange color after uglify
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
/* global Chart moment Color Hammer */
|
/* global Chart moment Color Hammer */
|
||||||
{
|
|
||||||
// This function add a new interaction mode to Chart.js that
|
// This function add a new interaction mode to Chart.js that
|
||||||
// returns one point for every dataset.
|
// returns one point for every dataset.
|
||||||
Chart.Interaction.modes.neareach = function (chart, e, options) {
|
Chart.Interaction.modes.neareach = function (chart, e, options) {
|
||||||
@ -63,14 +63,4 @@
|
|||||||
const ret = elements.filter(n => n !== undefined);
|
const ret = elements.filter(n => n !== undefined);
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fix infinite loop bug in Chart.js 2.7.1
|
|
||||||
const x = Chart.scaleService.constructors.time.prototype;
|
|
||||||
x._getLabelCapacity = x.getLabelCapacity;
|
|
||||||
x.getLabelCapacity = function () {
|
|
||||||
// eslint-disable-next-line prefer-rest-params
|
|
||||||
const ret = this._getLabelCapacity.apply(this, arguments);
|
|
||||||
return ret > 0 ? ret : 1;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user