mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-09 09:47:28 +03:00
Updated to react-chartjs-2 3.3
This commit is contained in:
parent
61b094ee7d
commit
8551fcf08f
5 changed files with 20 additions and 23 deletions
29
package-lock.json
generated
29
package-lock.json
generated
|
@ -26,7 +26,7 @@
|
||||||
"qs": "^6.9.6",
|
"qs": "^6.9.6",
|
||||||
"ramda": "^0.27.2",
|
"ramda": "^0.27.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-chartjs-2": "^3.0.4",
|
"react-chartjs-2": "^3.3.0",
|
||||||
"react-colorful": "^5.5.1",
|
"react-colorful": "^5.5.1",
|
||||||
"react-copy-to-clipboard": "^5.0.4",
|
"react-copy-to-clipboard": "^5.0.4",
|
||||||
"react-datepicker": "^3.6.0",
|
"react-datepicker": "^3.6.0",
|
||||||
|
@ -16718,7 +16718,8 @@
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash._reinterpolate": {
|
"node_modules/lodash._reinterpolate": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
@ -24060,14 +24061,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-chartjs-2": {
|
"node_modules/react-chartjs-2": {
|
||||||
"version": "3.0.4",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.3.0.tgz",
|
||||||
"integrity": "sha512-pcbFNpkPMTkGXXJ7k7hnukbRD0ZV01qB6JQY1ontITc2IYvhGlK6BBDy28VeydYs1Dl/c5ZpRgRVEtT5GUnxcQ==",
|
"integrity": "sha512-4Mt0SR2aiUbWi/4762odRBYSnbNKSs4HWc0o3IW43py5bMfmfpeZU95w6mbvtuLZH/M3GsPJMU8DvDc+5U9blQ==",
|
||||||
"dependencies": {
|
|
||||||
"lodash": "^4.17.19"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"chart.js": "^3.1.0",
|
"chart.js": "^3.5.0",
|
||||||
"react": "^16.8.0 || ^17.0.0"
|
"react": "^16.8.0 || ^17.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -44207,7 +44205,8 @@
|
||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash._reinterpolate": {
|
"lodash._reinterpolate": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
@ -50077,12 +50076,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-chartjs-2": {
|
"react-chartjs-2": {
|
||||||
"version": "3.0.4",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.3.0.tgz",
|
||||||
"integrity": "sha512-pcbFNpkPMTkGXXJ7k7hnukbRD0ZV01qB6JQY1ontITc2IYvhGlK6BBDy28VeydYs1Dl/c5ZpRgRVEtT5GUnxcQ==",
|
"integrity": "sha512-4Mt0SR2aiUbWi/4762odRBYSnbNKSs4HWc0o3IW43py5bMfmfpeZU95w6mbvtuLZH/M3GsPJMU8DvDc+5U9blQ==",
|
||||||
"requires": {
|
"requires": {}
|
||||||
"lodash": "^4.17.19"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"react-colorful": {
|
"react-colorful": {
|
||||||
"version": "5.5.1",
|
"version": "5.5.1",
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"qs": "^6.9.6",
|
"qs": "^6.9.6",
|
||||||
"ramda": "^0.27.2",
|
"ramda": "^0.27.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-chartjs-2": "^3.0.4",
|
"react-chartjs-2": "^3.3.0",
|
||||||
"react-colorful": "^5.5.1",
|
"react-colorful": "^5.5.1",
|
||||||
"react-copy-to-clipboard": "^5.0.4",
|
"react-copy-to-clipboard": "^5.0.4",
|
||||||
"react-datepicker": "^3.6.0",
|
"react-datepicker": "^3.6.0",
|
||||||
|
|
|
@ -57,8 +57,8 @@ export const DoughnutChart: FC<DoughnutChartProps> = memo(({ stats }) => {
|
||||||
<div className="col-sm-12 col-md-7">
|
<div className="col-sm-12 col-md-7">
|
||||||
<Doughnut
|
<Doughnut
|
||||||
height={300}
|
height={300}
|
||||||
data={chartData}
|
data={chartData as any}
|
||||||
options={options}
|
options={options as any}
|
||||||
ref={(element) => {
|
ref={(element) => {
|
||||||
setChartRef(element ?? undefined);
|
setChartRef(element ?? undefined);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -113,8 +113,8 @@ export const HorizontalBarChart: FC<HorizontalBarChartProps> = (
|
||||||
const renderChartComponent = (customKey: string) => (
|
const renderChartComponent = (customKey: string) => (
|
||||||
<Bar
|
<Bar
|
||||||
key={`${height}_${customKey}`}
|
key={`${height}_${customKey}`}
|
||||||
data={chartData}
|
data={chartData as any}
|
||||||
options={options}
|
options={options as any}
|
||||||
height={height}
|
height={height}
|
||||||
getElementAtEvent={chartElementAtEvent(labels, onClick) as any}
|
getElementAtEvent={chartElementAtEvent(labels, onClick) as any}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -222,8 +222,8 @@ const LineChartCard = (
|
||||||
};
|
};
|
||||||
const renderLineChart = () => (
|
const renderLineChart = () => (
|
||||||
<Line
|
<Line
|
||||||
data={generateChartData()}
|
data={generateChartData() as any}
|
||||||
options={options}
|
options={options as any}
|
||||||
getElementAtEvent={chartElementAtEvent(labels, datasetsByPoint, setSelectedVisits) as any}
|
getElementAtEvent={chartElementAtEvent(labels, datasetsByPoint, setSelectedVisits) as any}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue