MCPcopy
hub / github.com/chartjs/Chart.js / AppAuto

Function AppAuto

test/integration/react-browser/src/AppAuto.tsx:5–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import {merge} from 'chart.js/helpers';
4
5function AppAuto() {
6 useEffect(() => {
7 const c = Chart.getChart('myChart');
8 if (c) {
9 c.destroy();
10 }
11
12 merge({a: 1}, {b: 2});
13
14 // eslint-disable-next-line no-new
15 new Chart('myChart', {
16 type: 'doughnut',
17 data: {
18 labels: ['Chart', 'JS'],
19 datasets: [{
20 data: [2, 3]
21 }]
22 }
23 });
24 }, []);
25
26 return (
27 <div className="App">
28 <canvas id="myChart"></canvas>
29 </div>
30 );
31}
32
33export default AppAuto;

Callers

nothing calls this directly

Calls 2

mergeFunction · 0.90
destroyMethod · 0.80

Tested by

no test coverage detected