MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / initChart

Function initChart

web/pgadmin/static/js/chartjs/index.jsx:90–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 const theme = useTheme();
89
90 const initChart = function() {
91 Chart.register(...registerables);
92 // Register for Zoom Plugin
93 Chart.register(zoomPlugin);
94 let chartContext = chartRef.current.getContext('2d');
95 chartObj.current = new Chart(chartContext, {
96 type: type,
97 data: data,
98 plugins: [plugins],
99 options: options,
100 });
101 props.onInit?.(chartObj.current);
102 };
103
104 const destroyChart = function() {
105 chartObj.current?.resetZoom?.();

Callers 1

BaseChartFunction · 0.85

Calls 1

registerMethod · 0.45

Tested by

no test coverage detected