We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e22cd51 commit 607ec16Copy full SHA for 607ec16
src/components/base/index.tsx
@@ -99,9 +99,13 @@ const BaseChart = <C extends PlotConfig>(
99
const { current: container } = containerRef
100
/* istanbul ignore else */
101
if (container) {
102
- const { data, ...config } = restProps as ChartConfig
+ const { data = [], ...config } = restProps as ChartConfig
103
configRef.current = cloneDeep(config)
104
- chartRef.current = new Chart(container, restProps as C)
+ const mergedConfig = {
105
+ ...config,
106
+ data,
107
+ } as any
108
+ chartRef.current = new Chart(container, mergedConfig)
109
chartRef.current.render()
110
111
if (stateManager && stateManagerCfg) {
0 commit comments