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

Function App

test/integration/react-browser/src/App.tsx:7–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

mergeFunction · 0.90
destroyMethod · 0.80

Tested by

no test coverage detected