Обновлён плагин zoom для графиков.

This commit is contained in:
Alexey 2021-07-26 11:13:16 +05:00
parent 926d0f7857
commit eab4c5cf85
3 changed files with 9 additions and 9 deletions

14
package-lock.json generated
View File

@ -16,7 +16,7 @@
"chart.js": "^3.3.0", "chart.js": "^3.3.0",
"chartjs-adapter-moment": "^1.0.0", "chartjs-adapter-moment": "^1.0.0",
"chartjs-plugin-datalabels": "^2.0.0-rc.1", "chartjs-plugin-datalabels": "^2.0.0-rc.1",
"chartjs-plugin-zoom": "^1.0.1", "chartjs-plugin-zoom": "^1.1.1",
"craco-less": "^1.17.1", "craco-less": "^1.17.1",
"date-fns": "^2.20.0", "date-fns": "^2.20.0",
"moment": "^2.29.1", "moment": "^2.29.1",
@ -4832,9 +4832,9 @@
"integrity": "sha512-p3JwpvIspZKHB7cRas3xoxa5BYeCOMCuCTp/AS/44RyvO8OuZ/Pz0DWl3WK2L+BMnoK72UUm0XnGLKiMEekaYA==" "integrity": "sha512-p3JwpvIspZKHB7cRas3xoxa5BYeCOMCuCTp/AS/44RyvO8OuZ/Pz0DWl3WK2L+BMnoK72UUm0XnGLKiMEekaYA=="
}, },
"node_modules/chartjs-plugin-zoom": { "node_modules/chartjs-plugin-zoom": {
"version": "1.0.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.0.1.tgz", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.1.1.tgz",
"integrity": "sha512-3G2Fjd1yhv+E54l0znz1zDOTA8KuUHNtPIP2s/aprNOwIQc5EQ0UVfvGuwiSXYuZuypIGQm4QOP55DPlv7wOXw==", "integrity": "sha512-1q54WOzK7FtAjkbemQeqvmFUV0btNYIQny2HbQ6Awq9wUtCz7Zmj6vIgp3C1DYMQwN0nqgpC3vnApqiwI7cSdQ==",
"dependencies": { "dependencies": {
"hammerjs": "^2.0.8" "hammerjs": "^2.0.8"
}, },
@ -25542,9 +25542,9 @@
"integrity": "sha512-p3JwpvIspZKHB7cRas3xoxa5BYeCOMCuCTp/AS/44RyvO8OuZ/Pz0DWl3WK2L+BMnoK72UUm0XnGLKiMEekaYA==" "integrity": "sha512-p3JwpvIspZKHB7cRas3xoxa5BYeCOMCuCTp/AS/44RyvO8OuZ/Pz0DWl3WK2L+BMnoK72UUm0XnGLKiMEekaYA=="
}, },
"chartjs-plugin-zoom": { "chartjs-plugin-zoom": {
"version": "1.0.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.0.1.tgz", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.1.1.tgz",
"integrity": "sha512-3G2Fjd1yhv+E54l0znz1zDOTA8KuUHNtPIP2s/aprNOwIQc5EQ0UVfvGuwiSXYuZuypIGQm4QOP55DPlv7wOXw==", "integrity": "sha512-1q54WOzK7FtAjkbemQeqvmFUV0btNYIQny2HbQ6Awq9wUtCz7Zmj6vIgp3C1DYMQwN0nqgpC3vnApqiwI7cSdQ==",
"requires": { "requires": {
"hammerjs": "^2.0.8" "hammerjs": "^2.0.8"
} }

View File

@ -12,7 +12,7 @@
"chart.js": "^3.3.0", "chart.js": "^3.3.0",
"chartjs-adapter-moment": "^1.0.0", "chartjs-adapter-moment": "^1.0.0",
"chartjs-plugin-datalabels": "^2.0.0-rc.1", "chartjs-plugin-datalabels": "^2.0.0-rc.1",
"chartjs-plugin-zoom": "^1.0.1", "chartjs-plugin-zoom": "^1.1.1",
"craco-less": "^1.17.1", "craco-less": "^1.17.1",
"date-fns": "^2.20.0", "date-fns": "^2.20.0",
"moment": "^2.29.1", "moment": "^2.29.1",

View File

@ -220,5 +220,5 @@ export const ChartDepthToDayBase: React.FC<ChartTimeBaseProps> = ({options, data
chart.update() chart.update()
}, [chart, dataParams, options]) }, [chart, dataParams, options])
return(<canvas height='100%' width='100%' ref={chartRef} />) return(<canvas ref={chartRef} />)
} }