lowcoder-map-component 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +37 -0
  2. package/icons/demo-icon.svg +10 -0
  3. package/icons/hills.svg +17 -0
  4. package/index.css +27 -0
  5. package/index.html +35 -0
  6. package/index.tsx +20 -0
  7. package/loader.mjs +11 -0
  8. package/package.json +175 -0
  9. package/src/README.md +35 -0
  10. package/src/components/ChartPropertyView.tsx +961 -0
  11. package/src/components/SeriesComp.tsx +368 -0
  12. package/src/components/TabPropertyView.tsx +127 -0
  13. package/src/comps/Barcharts/comp.tsx +338 -0
  14. package/src/comps/Barcharts/constants.tsx +77 -0
  15. package/src/comps/Linecharts/comp.tsx +350 -0
  16. package/src/comps/Linecharts/constants.tsx +53 -0
  17. package/src/comps/Linechartsv2/comp.tsx +350 -0
  18. package/src/comps/Linechartsv2/constants.tsx +68 -0
  19. package/src/comps/Mapcharts/comp.tsx +381 -0
  20. package/src/comps/Mapcharts/constants.tsx +312 -0
  21. package/src/comps/Mapchartsv2/comp.tsx +393 -0
  22. package/src/comps/Mapchartsv2/constants.tsx +340 -0
  23. package/src/comps/MixedLineBarCharts/comp.tsx +353 -0
  24. package/src/comps/MixedLineBarCharts/constants.tsx +60 -0
  25. package/src/comps/MultiLineCharts/comp.tsx +362 -0
  26. package/src/comps/MultiLineCharts/constants.tsx +96 -0
  27. package/src/comps/PercentageCharts/comp.tsx +359 -0
  28. package/src/comps/PercentageCharts/constants.tsx +98 -0
  29. package/src/comps/Piecharts/comp.tsx +334 -0
  30. package/src/comps/Piecharts/constants.tsx +48 -0
  31. package/src/comps/Tablecharts/comp.tsx +429 -0
  32. package/src/comps/Tablecharts/constants.tsx +97 -0
  33. package/src/comps/Totalcharts/comp.tsx +463 -0
  34. package/src/comps/Totalcharts/constants.tsx +66 -0
  35. package/src/comps/TwoLineCharts/comp.tsx +350 -0
  36. package/src/comps/TwoLineCharts/constants.tsx +82 -0
  37. package/src/comps/mapComponent/comp.tsx +338 -0
  38. package/src/comps/mapComponent/constants.tsx +2149 -0
  39. package/src/comps/tab/comp.tsx +283 -0
  40. package/src/comps/tab/constants.tsx +79 -0
  41. package/src/configs/barChartConfig.tsx +153 -0
  42. package/src/configs/baseConfig.tsx +66 -0
  43. package/src/configs/candleStickChartConfig.tsx +35 -0
  44. package/src/configs/cartesianAxisConfig.tsx +314 -0
  45. package/src/configs/chartUrls.tsx +9 -0
  46. package/src/configs/echartConfig.tsx +260 -0
  47. package/src/configs/echartsLabelConfig.tsx +47 -0
  48. package/src/configs/echartsLegendConfig.tsx +29 -0
  49. package/src/configs/echartsTitleConfig.tsx +49 -0
  50. package/src/configs/echartsTitleVerticalConfig.tsx +50 -0
  51. package/src/configs/funnelChartConfig.tsx +35 -0
  52. package/src/configs/gaugeChartConfig.tsx +31 -0
  53. package/src/configs/graphChartConfig.tsx +31 -0
  54. package/src/configs/heatmapChartConfig.tsx +31 -0
  55. package/src/configs/legendConfig.tsx +55 -0
  56. package/src/configs/lineChartConfig.tsx +246 -0
  57. package/src/configs/lineChartConfigv2.tsx +246 -0
  58. package/src/configs/mapChartConfig.tsx +106 -0
  59. package/src/configs/mapChartConfigv2.tsx +106 -0
  60. package/src/configs/mixedChartConfig.tsx +21 -0
  61. package/src/configs/pieChartConfig.tsx +156 -0
  62. package/src/configs/radarChartConfig.tsx +31 -0
  63. package/src/configs/sankeyChartConfig.tsx +35 -0
  64. package/src/configs/scatterChartConfig.tsx +152 -0
  65. package/src/configs/sunburstChartConfig.tsx +31 -0
  66. package/src/configs/tabConfig.tsx +0 -0
  67. package/src/configs/tableChartConfig.tsx +81 -0
  68. package/src/configs/themeriverChartConfig.tsx +31 -0
  69. package/src/configs/totalChartConfig.tsx +670 -0
  70. package/src/configs/treeChartConfig.tsx +31 -0
  71. package/src/configs/treemapChartConfig.tsx +31 -0
  72. package/src/controls/AnimationsControls.tsx +3 -0
  73. package/src/controls/AutoHeightControl.tsx +2 -0
  74. package/src/controls/AxisControls.tsx +146 -0
  75. package/src/controls/AxisVisibilityControl.tsx +14 -0
  76. package/src/controls/ChartTypeControl.tsx +15 -0
  77. package/src/controls/ColorScaleControl.tsx +221 -0
  78. package/src/controls/ColumnControl.tsx +204 -0
  79. package/src/controls/ConfigControl.tsx +37 -0
  80. package/src/controls/DirectionControls.tsx +20 -0
  81. package/src/controls/IconControl.tsx +88 -0
  82. package/src/controls/LegendControl.tsx +8 -0
  83. package/src/controls/RowLimitControl.tsx +91 -0
  84. package/src/controls/StyleControls.tsx +22 -0
  85. package/src/controls/TimeControls.tsx +41 -0
  86. package/src/controls/TrendlineControl.tsx +89 -0
  87. package/src/controls/UIEventControl.tsx +21 -0
  88. package/src/controls/index.ts +16 -0
  89. package/src/controls/radioControl.tsx +88 -0
  90. package/src/exposing/index.ts +3 -0
  91. package/src/exposing/setPoint.ts +19 -0
  92. package/src/geo/vn.geo.json +369897 -0
  93. package/src/geo/world.geo.json +32127 -0
  94. package/src/i18n/comps/index.tsx +39 -0
  95. package/src/i18n/comps/locales/en.ts +558 -0
  96. package/src/i18n/comps/locales/enObj.tsx +7186 -0
  97. package/src/i18n/comps/locales/index.ts +7 -0
  98. package/src/i18n/comps/locales/pt.ts +37 -0
  99. package/src/i18n/comps/locales/ptObj.tsx +40 -0
  100. package/src/i18n/comps/locales/types.tsx +622 -0
  101. package/src/i18n/comps/locales/zh.ts +3 -0
  102. package/src/i18n/comps/locales/zhObj.tsx +4 -0
  103. package/src/index.ts +31 -0
  104. package/src/types/global.d.ts +9 -0
  105. package/src/types/lowcoder-sdk.d.ts +578 -0
  106. package/src/utils/chartStyle.util.ts +121 -0
  107. package/src/utils/columnExtractor.util.ts +41 -0
  108. package/src/utils/dataTransform.util.ts +37 -0
  109. package/src/utils/deepEqual.util.ts +29 -0
  110. package/src/utils/echarts.util.tsx +822 -0
  111. package/src/utils/getDataKey.util.ts +115 -0
  112. package/src/utils/getLinearRegression.util.ts +46 -0
  113. package/src/utils/googleMaps.util.ts +28 -0
  114. package/src/utils/isEmpty.util.ts +10 -0
  115. package/src/utils/move.util.ts +6 -0
  116. package/src/utils/selection.util.ts +73 -0
  117. package/src/utils/style.util.ts +315 -0
  118. package/src/utils/time.util.ts +221 -0
  119. package/src/utils/timeFormatter.util.ts +104 -0
  120. package/src/utils/timeProcessing.util.ts +38 -0
  121. package/src/utils/trendline.util.ts +342 -0
  122. package/tsconfig.json +25 -0
  123. package/vite.config.js +19 -0
@@ -0,0 +1,359 @@
1
+ import { ChartPropertyView } from "@/components/ChartPropertyView";
2
+ import { EchartsAxisType } from "@/configs/cartesianAxisConfig";
3
+ import { eChartConfigOmitChildren } from "@/configs/echartConfig";
4
+ import { ItemColorComp } from "@/configs/lineChartConfig";
5
+ import { AxisFormatterComp } from "@/controls";
6
+ import { getEchartsLocale, trans } from "@/i18n/comps";
7
+ import { formatAllStyles } from "@/utils/chartStyle.util";
8
+ import { deepEqual } from "@/utils/deepEqual.util";
9
+ import { ChartSize, echartProps, getEChartConfig } from "@/utils/echarts.util";
10
+ import { getDataKeys } from "@/utils/getDataKey.util";
11
+ import { getSelectedPoints } from "@/utils/selection.util";
12
+ import ReactECharts from "echarts-for-react";
13
+ import EChartsReactCore from "echarts-for-react/lib/core";
14
+ import {
15
+ changeChildAction,
16
+ changeValueAction,
17
+ chartColorPalette,
18
+ childrenToProps,
19
+ CompAction,
20
+ CompActionTypes,
21
+ depsConfig,
22
+ genRandomKey,
23
+ getPromiseAfterDispatch,
24
+ JSONObject,
25
+ NameConfig,
26
+ Theme,
27
+ ThemeContext,
28
+ UICompBuilder,
29
+ valueComp,
30
+ withDefault,
31
+ withExposingConfigs,
32
+ withViewFn,
33
+ wrapChildAction,
34
+ } from "lowcoder-sdk";
35
+ import { useContext, useEffect, useMemo, useRef, useState } from "react";
36
+ import { useResizeDetector } from "react-resize-detector";
37
+ import { chartUiProps } from "./constants";
38
+
39
+ let clickEventCallback = () => {};
40
+
41
+ let PercentageChartTmpComp = (function () {
42
+ return new UICompBuilder(
43
+ {
44
+ ...echartProps,
45
+ ...chartUiProps,
46
+ },
47
+ () => null
48
+ )
49
+ .setPropertyViewFn(ChartPropertyView)
50
+ .build();
51
+ })();
52
+
53
+ PercentageChartTmpComp = withViewFn(PercentageChartTmpComp, (comp) => {
54
+ const onUIEvent = comp.children.onUIEvent.getView();
55
+ const onEvent = comp.children.onEvent.getView();
56
+ const eChartCompRef = useRef<EChartsReactCore | null>();
57
+ const containerRef = useRef<HTMLDivElement>(null);
58
+ const [chartSize, setChartSize] = useState<ChartSize>();
59
+ const firstResize = useRef(true);
60
+ const theme: Theme = useContext(ThemeContext);
61
+
62
+ const defaultChartTheme = {
63
+ color: chartColorPalette,
64
+ backgroundColor: "#fff",
65
+ };
66
+
67
+ let themeConfig = defaultChartTheme;
68
+ try {
69
+ themeConfig = theme?.theme?.chart
70
+ ? JSON.parse(theme.theme.chart)
71
+ : defaultChartTheme;
72
+ } catch (error) {
73
+ console.error("theme chart error: ", error);
74
+ }
75
+
76
+ const triggerClickEvent = async (dispatch: any, action: CompAction) => {
77
+ await getPromiseAfterDispatch(dispatch, action, {
78
+ autoHandleAfterReduce: true,
79
+ });
80
+ onEvent("click");
81
+ };
82
+
83
+ useEffect(() => {
84
+ const eChartCompInstance = eChartCompRef?.current?.getEchartsInstance();
85
+ if (!eChartCompInstance) {
86
+ return undefined;
87
+ }
88
+ eChartCompInstance?.on("click", (param: any) => {
89
+ document.dispatchEvent(
90
+ new CustomEvent("clickEvent", {
91
+ bubbles: true,
92
+ detail: {
93
+ action: "click",
94
+ data: param.data,
95
+ },
96
+ })
97
+ );
98
+ triggerClickEvent(
99
+ comp.dispatch,
100
+ changeChildAction("lastInteractionData", param.data, false)
101
+ );
102
+ });
103
+ return () => {
104
+ eChartCompInstance?.off("click");
105
+ document.removeEventListener("clickEvent", clickEventCallback);
106
+ };
107
+ }, []);
108
+
109
+ useEffect(() => {
110
+ // bind events
111
+ const eChartCompInstance = eChartCompRef?.current?.getEchartsInstance();
112
+ if (!eChartCompInstance) {
113
+ return;
114
+ }
115
+ eChartCompInstance?.on("selectchanged", (param: any) => {
116
+ const option: any = eChartCompInstance?.getOption();
117
+ document.dispatchEvent(
118
+ new CustomEvent("clickEvent", {
119
+ bubbles: true,
120
+ detail: {
121
+ action: param.fromAction,
122
+ data: getSelectedPoints(param, option),
123
+ },
124
+ })
125
+ );
126
+
127
+ if (param.fromAction === "select") {
128
+ comp.dispatch(
129
+ changeChildAction(
130
+ "selectedPoints",
131
+ getSelectedPoints(param, option),
132
+ false
133
+ )
134
+ );
135
+ onUIEvent("select");
136
+ } else if (param.fromAction === "unselect") {
137
+ comp.dispatch(
138
+ changeChildAction(
139
+ "selectedPoints",
140
+ getSelectedPoints(param, option),
141
+ false
142
+ )
143
+ );
144
+ onUIEvent("unselect");
145
+ }
146
+
147
+ triggerClickEvent(
148
+ comp.dispatch,
149
+ changeChildAction(
150
+ "lastInteractionData",
151
+ getSelectedPoints(param, option),
152
+ false
153
+ )
154
+ );
155
+ });
156
+ // unbind
157
+ return () => {
158
+ eChartCompInstance?.off("selectchanged");
159
+ document.removeEventListener("clickEvent", clickEventCallback);
160
+ };
161
+ }, [onUIEvent]);
162
+
163
+ const eChartConfigChildren: any = {};
164
+ for (const [key, value] of Object.entries(comp.children)) {
165
+ if (!eChartConfigOmitChildren.includes(key as any)) {
166
+ eChartConfigChildren[key] = value;
167
+ }
168
+ }
169
+
170
+ const childrenProps = formatAllStyles(childrenToProps(comp.children));
171
+
172
+ const option = useMemo(() => {
173
+ return getEChartConfig(childrenProps, chartSize, themeConfig);
174
+ }, [themeConfig, childrenProps, chartSize]);
175
+
176
+ useResizeDetector({
177
+ targetRef: containerRef,
178
+ onResize: ({ width, height }) => {
179
+ if (width && height) {
180
+ setChartSize({ w: width, h: height });
181
+ }
182
+ if (!firstResize.current) {
183
+ // ignore the first resize, which will impact the loading animation
184
+ eChartCompRef.current?.getEchartsInstance().resize();
185
+ } else {
186
+ firstResize.current = false;
187
+ }
188
+ },
189
+ });
190
+
191
+ return (
192
+ <div ref={containerRef} style={{ height: "100%" }}>
193
+ <ReactECharts
194
+ ref={(e) => (eChartCompRef.current = e)}
195
+ style={{ height: "100%" }}
196
+ notMerge
197
+ lazyUpdate
198
+ opts={{ locale: getEchartsLocale() }}
199
+ option={{
200
+ ...option,
201
+ tooltip: {
202
+ trigger: "axis",
203
+ formatter: (params: any) => {
204
+ const item = params[0];
205
+ return `${item.axisValue}<br/>${item.value}%`;
206
+ },
207
+ },
208
+
209
+ yAxis: {
210
+ type: "value",
211
+ axisLabel: {
212
+ formatter: "{value}%",
213
+ },
214
+ },
215
+ }}
216
+ />
217
+ </div>
218
+ );
219
+ });
220
+
221
+ function getYAxisFormatContextValue(
222
+ data: Array<JSONObject>,
223
+ yAxisType: EchartsAxisType,
224
+ yAxisName?: string
225
+ ) {
226
+ const dataSample = yAxisName && data.length > 0 && data[0][yAxisName];
227
+ let contextValue = dataSample;
228
+ if (yAxisType === "time") {
229
+ // to timestamp
230
+ const time =
231
+ typeof dataSample === "number" || typeof dataSample === "string"
232
+ ? new Date(dataSample).getTime()
233
+ : null;
234
+ if (time) contextValue = time;
235
+ }
236
+ return contextValue;
237
+ }
238
+
239
+ PercentageChartTmpComp = class extends PercentageChartTmpComp {
240
+ updateContext(comp: any) {
241
+ // the context value of axis format
242
+ let resultComp = comp;
243
+ const data = comp.children.data.getView();
244
+ const sampleSeries = comp.children.series
245
+ .getView()
246
+ .find((s: any) => !s.getView().hide);
247
+ const yAxisContextValue = getYAxisFormatContextValue(
248
+ data,
249
+ comp.children.yConfig.children.yAxisType.getView(),
250
+ sampleSeries?.children.columnName.getView()
251
+ );
252
+ if (yAxisContextValue !== comp.lastYAxisFormatContextVal) {
253
+ comp.lastYAxisFormatContextVal = yAxisContextValue;
254
+ resultComp = comp.setChild(
255
+ "yConfig",
256
+ comp.children.yConfig.reduce(
257
+ wrapChildAction(
258
+ "formatter",
259
+ AxisFormatterComp.changeContextDataAction({
260
+ value: yAxisContextValue,
261
+ })
262
+ )
263
+ )
264
+ );
265
+ }
266
+ // item color context
267
+ const colorContextVal = {
268
+ seriesName: sampleSeries?.children.seriesName.getView(),
269
+ value: yAxisContextValue,
270
+ };
271
+ if (
272
+ comp.children.chartConfig.children.comp.children.hasOwnProperty(
273
+ "itemColor"
274
+ ) &&
275
+ !deepEqual(colorContextVal, comp.lastColorContext)
276
+ ) {
277
+ comp.lastColorContext = colorContextVal;
278
+ resultComp = resultComp.setChild(
279
+ "chartConfig",
280
+ comp.children.chartConfig.reduce(
281
+ wrapChildAction(
282
+ "comp",
283
+ wrapChildAction(
284
+ "itemColor",
285
+ ItemColorComp.changeContextDataAction(colorContextVal)
286
+ )
287
+ )
288
+ )
289
+ );
290
+ }
291
+ return resultComp;
292
+ }
293
+
294
+ reduce(action: CompAction): this {
295
+ const comp = super.reduce(action);
296
+ if (action.type === CompActionTypes.UPDATE_NODES_V2) {
297
+ const newData = comp.children.data.getView();
298
+ // data changes
299
+ if (comp.children.data !== this.children.data) {
300
+ setTimeout(() => {
301
+ // update x-axis value
302
+ const keys = getDataKeys({ data: newData, dataType: "string" });
303
+ if (
304
+ keys.length > 0 &&
305
+ !keys.includes(comp.children.xAxisKey.getView())
306
+ ) {
307
+ comp.children.xAxisKey.dispatch(changeValueAction(keys[0] || ""));
308
+ }
309
+ // pass to child series comp
310
+ comp.children.series.dispatchDataChanged(newData);
311
+ }, 0);
312
+ }
313
+ return this.updateContext(comp);
314
+ }
315
+ return comp;
316
+ }
317
+
318
+ autoHeight(): boolean {
319
+ return false;
320
+ }
321
+ };
322
+
323
+ let PercentageChartComp = withExposingConfigs(PercentageChartTmpComp, [
324
+ depsConfig({
325
+ name: "selectedPoints",
326
+ desc: trans("chart.selectedPointsDesc"),
327
+ depKeys: ["selectedPoints"],
328
+ func: (input) => {
329
+ return input.selectedPoints;
330
+ },
331
+ }),
332
+ depsConfig({
333
+ name: "lastInteractionData",
334
+ desc: trans("chart.lastInteractionDataDesc"),
335
+ depKeys: ["lastInteractionData"],
336
+ func: (input) => {
337
+ return input.lastInteractionData;
338
+ },
339
+ }),
340
+ depsConfig({
341
+ name: "data",
342
+ desc: trans("chart.dataDesc"),
343
+ depKeys: ["data", "mode"],
344
+ func: (input) => [],
345
+ }),
346
+ new NameConfig("title", trans("chart.titleDesc")),
347
+ ]);
348
+
349
+ export const PercentageChartCompWithDefault = withDefault(PercentageChartComp, {
350
+ xAxisKey: valueComp<string>("quarter"),
351
+ series: [
352
+ {
353
+ dataIndex: genRandomKey(),
354
+ seriesName: "Value",
355
+ columnName: "value",
356
+ chartType: "line",
357
+ },
358
+ ],
359
+ });
@@ -0,0 +1,98 @@
1
+ import { createSeriesListComp } from "@/components/SeriesComp";
2
+ import { ChartOptionMap } from "@/controls";
3
+ import { trans } from "@/i18n/comps";
4
+ import {
5
+ EchartDefaultTextStyle,
6
+ jsonControl,
7
+ RecordConstructorToView,
8
+ StringControl,
9
+ styleControl,
10
+ toJSONObjectArray,
11
+ uiChildren,
12
+ withDefault,
13
+ withType,
14
+ } from "lowcoder-sdk";
15
+
16
+ const defaultChartData = [
17
+ { quarter: "Q1-2008", value: 90 },
18
+ { quarter: "Q2-2008", value: 85 },
19
+ { quarter: "Q3-2008", value: 83 },
20
+ { quarter: "Q4-2008", value: 85 },
21
+ { quarter: "Q1-2009", value: 88 },
22
+ { quarter: "Q2-2009", value: 90 },
23
+ { quarter: "Q3-2009", value: 92 },
24
+ { quarter: "Q4-2009", value: 95 },
25
+ { quarter: "Q1-2010", value: 98 },
26
+ { quarter: "Q2-2010", value: 102 },
27
+ { quarter: "Q3-2010", value: 106 },
28
+ { quarter: "Q4-2010", value: 109 },
29
+ { quarter: "Q1-2011", value: 110 },
30
+ { quarter: "Q2-2011", value: 111 },
31
+ { quarter: "Q3-2011", value: 112 },
32
+ { quarter: "Q4-2011", value: 113 },
33
+ { quarter: "Q1-2012", value: 114 },
34
+ { quarter: "Q2-2012", value: 115 },
35
+ { quarter: "Q3-2012", value: 116 },
36
+ { quarter: "Q4-2012", value: 115 },
37
+ { quarter: "Q1-2013", value: 114 },
38
+ { quarter: "Q2-2013", value: 113 },
39
+ { quarter: "Q3-2013", value: 112 },
40
+ { quarter: "Q4-2013", value: 111 },
41
+ { quarter: "Q1-2014", value: 110 },
42
+ { quarter: "Q2-2014", value: 109 },
43
+ { quarter: "Q3-2014", value: 107 },
44
+ { quarter: "Q4-2014", value: 106 },
45
+ { quarter: "Q1-2015", value: 105 },
46
+ { quarter: "Q2-2015", value: 104 },
47
+ { quarter: "Q3-2015", value: 103 },
48
+ { quarter: "Q4-2015", value: 102 },
49
+ { quarter: "Q1-2016", value: 101 },
50
+ { quarter: "Q2-2016", value: 100 },
51
+ { quarter: "Q3-2016", value: 98 },
52
+ { quarter: "Q4-2016", value: 97 },
53
+ { quarter: "Q1-2017", value: 96 },
54
+ { quarter: "Q2-2017", value: 95 },
55
+ { quarter: "Q3-2017", value: 94 },
56
+ { quarter: "Q4-2017", value: 93 },
57
+ { quarter: "Q1-2018", value: 92 },
58
+ { quarter: "Q2-2018", value: 91 },
59
+ { quarter: "Q3-2018", value: 90 },
60
+ { quarter: "Q4-2018", value: 91 },
61
+ { quarter: "Q1-2019", value: 92 },
62
+ { quarter: "Q2-2019", value: 93 },
63
+ { quarter: "Q3-2019", value: 92 },
64
+ { quarter: "Q4-2019", value: 90 },
65
+ { quarter: "Q1-2020", value: 88 },
66
+ { quarter: "Q2-2020", value: 85 },
67
+ { quarter: "Q3-2020", value: 83 },
68
+ ];
69
+
70
+ export const chartUiProps = {
71
+ chartConfig: withType(ChartOptionMap, "line"),
72
+ chartType: withDefault(StringControl, "line"),
73
+ title: withDefault(StringControl, trans("percentageChart.defaultTitle")),
74
+ defaultData: jsonControl(toJSONObjectArray, defaultChartData),
75
+ series: createSeriesListComp("line"),
76
+ xAxisStyle: styleControl(EchartDefaultTextStyle, "xAxis"),
77
+ yAxisStyle: styleControl(EchartDefaultTextStyle, "yAxisStyle"),
78
+ };
79
+
80
+ const chartUiChildrenMap = uiChildren(chartUiProps);
81
+ export type ChartUiPropsType = RecordConstructorToView<
82
+ typeof chartUiChildrenMap
83
+ >;
84
+
85
+ export type UIChartDataType = {
86
+ seriesName: string;
87
+ // coordinate chart
88
+ x?: any;
89
+ y?: any;
90
+ // pie or funnel
91
+ itemName?: any;
92
+ value?: any;
93
+ };
94
+
95
+ export type NonUIChartDataType = {
96
+ name: string;
97
+ value: any;
98
+ };