@baishuyun/ui-business 4.1.0 → 4.1.2

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.
@@ -0,0 +1,126 @@
1
+ import { jsxs as y, jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as O, useRef as h, useState as S, useImperativeHandle as w, useEffect as p } from "react";
3
+ import { i as C } from "../vendors/echarts.js";
4
+ import { c as m } from "../vendors/clsx.js";
5
+ function v(t, x, s, o) {
6
+ let c = 0, a = 0;
7
+ const f = parseInt(o.fontSize) || 10;
8
+ function u(e) {
9
+ let n = "";
10
+ if (e.fontSize || e.fontFamily || e.fontWeight) {
11
+ let i = "";
12
+ typeof e.fontSize == "string" && (e.fontSize.indexOf("px") !== -1 || e.fontSize.indexOf("rem") !== -1 || e.fontSize.indexOf("em") !== -1) ? i = e.fontSize : isNaN(+e.fontSize) ? i = "12px" : i = e.fontSize + "px", n = [e.fontStyle, e.fontWeight, i, e.fontFamily || "sans-serif"].join(
13
+ " "
14
+ );
15
+ }
16
+ return n && n.trim() || e.textFont || e.font;
17
+ }
18
+ function l(e, n) {
19
+ n.fontSize = parseInt(n.fontSize), n.fontFamily = n.fontFamily || "verdana";
20
+ const i = u(n), z = document.createElement("canvas").getContext("2d") || {};
21
+ return z.font = i, z?.measureText(e)?.width || 0;
22
+ }
23
+ function r(e, n) {
24
+ if (Array.isArray(e))
25
+ for (let i = 0, A = e.length; i < A && n.apply(e[i], [i, e[i]]) !== !1; i++) ;
26
+ else if (e && typeof e == "object") {
27
+ for (const i in e)
28
+ if (Object.prototype.hasOwnProperty.call(e, i) && n.apply(e[i], [i, e[i]]) === !1) break;
29
+ }
30
+ }
31
+ return t.legend.type === "scroll" ? f + 10 : (r(x, (e, n) => {
32
+ const i = l(
33
+ n,
34
+ o || {
35
+ fontFamily: "verdana",
36
+ fontSize: 10,
37
+ fontStyle: "normal",
38
+ fontWeight: "normal"
39
+ }
40
+ );
41
+ a += i + 10 + 14 + 5, a > s && (c++, a = i + 10 + 14 + 5);
42
+ }), (c + 1) * (f + 10));
43
+ }
44
+ const g = {
45
+ "auto-grid-echart": "_auto-grid-echart_w04s7_1",
46
+ "xAxis-title": "_xAxis-title_w04s7_6",
47
+ "yAxis-title": "_yAxis-title_w04s7_11"
48
+ }, b = (t, x) => {
49
+ const s = h(null), o = h(null), c = h(null), [a, f] = S("10px"), u = t.dataList.map((r) => r.name), l = () => {
50
+ if (s.current) {
51
+ let r = v(
52
+ t.option,
53
+ u,
54
+ s.current.offsetWidth,
55
+ t.option.legend.textStyle
56
+ ) + 30;
57
+ return t.options.legend.position === t.options.xAxis.position ? f(
58
+ v(
59
+ t.option,
60
+ u,
61
+ s.current.offsetWidth,
62
+ t.option.legend.textStyle
63
+ ) + 10
64
+ ) : f("0"), t.options.xAxis?.title.text && t.options.xAxis?.title.text.length > 0 && t.options.legend.position === t.options.xAxis.position && (r += 30), {
65
+ ...t.option,
66
+ grid: {
67
+ top: t.options.legend.position === "top" ? r : 40,
68
+ bottom: t.options.legend.position === "bottom" ? r : 40,
69
+ left: t.options.legend.position === "left" ? r : 40,
70
+ right: t.options.legend.position === "right" ? r : 40
71
+ }
72
+ };
73
+ }
74
+ return {
75
+ ...t.option
76
+ };
77
+ };
78
+ return w(x, () => ({
79
+ resizeEchart: () => {
80
+ o.current?.resize();
81
+ }
82
+ })), p(() => {
83
+ if (!s.current) return;
84
+ o.current = C(s.current);
85
+ const r = l();
86
+ o.current.setOption(r, !0), o.current.on("click", function(n) {
87
+ t.onChartClick && t.onChartClick(n, t.options, t.dataList);
88
+ });
89
+ const e = () => {
90
+ if (o.current) {
91
+ const n = l();
92
+ o.current.setOption(n, !1);
93
+ }
94
+ };
95
+ return setTimeout(e, 100), t.onChartReady && t.onChartReady(o.current), c.current = new ResizeObserver(() => {
96
+ o.current?.resize(), setTimeout(e, 50);
97
+ }), s.current && c.current.observe(s.current), () => {
98
+ c.current?.disconnect(), o.current?.dispose();
99
+ };
100
+ }, []), p(() => {
101
+ if (!o.current) return;
102
+ const r = l();
103
+ o.current.setOption(r, !0);
104
+ }, [t.option]), /* @__PURE__ */ y("div", { className: m(t.className, g["auto-grid-echart"]), children: [
105
+ /* @__PURE__ */ d("div", { ref: s, style: { width: "100%", height: "100%", ...t.style } }),
106
+ /* @__PURE__ */ d(
107
+ "div",
108
+ {
109
+ className: m(g["xAxis-title"]),
110
+ style: t.option.xAxis?.position === "bottom" ? { bottom: a } : t.option.xAxis?.position === "top" ? { top: a } : void 0,
111
+ children: /* @__PURE__ */ d("span", { children: t.option.xAxis?.title })
112
+ }
113
+ ),
114
+ /* @__PURE__ */ d(
115
+ "div",
116
+ {
117
+ className: m(g["yAxis-title"]),
118
+ style: t.option.yAxis?.position === "left" ? { left: "20px" } : t.option.yAxis?.position === "right" ? { right: "20px" } : void 0,
119
+ children: /* @__PURE__ */ d("span", { children: t.option.yAxis?.title })
120
+ }
121
+ )
122
+ ] });
123
+ }, R = O(b);
124
+ export {
125
+ R as A
126
+ };
@@ -0,0 +1,235 @@
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { forwardRef as y, useRef as v, useImperativeHandle as m } from "react";
3
+ import { R as A } from "../vendors/echarts.js";
4
+ import { A as S } from "./AutoGridEChart-DubWMmib.js";
5
+ const w = (t, g) => {
6
+ const r = v(null), c = (o) => {
7
+ const n = {
8
+ index0: [],
9
+ // 所有系列的第一个数据(data[0])
10
+ index1: []
11
+ // 所有系列的第二个数据(data[1])
12
+ };
13
+ return o.forEach((e) => {
14
+ n.index0.push(e.data[0]), n.index1.push(e.data[1]);
15
+ }), n;
16
+ }, d = (o) => {
17
+ const n = Math.max(...o), e = Math.min(...o), i = (o.reduce((a, b) => a + b, 0) / o.length).toFixed(2);
18
+ return { max: n, min: e, avg: Number(i) };
19
+ }, x = c(t.dataList), l = d(x.index0), s = d(x.index1), f = t.options.xFields[t.options.xFields.length - 1].colors || [], u = {
20
+ xAxis: {
21
+ axisLabel: {
22
+ color: "#666666",
23
+ fontSize: 10,
24
+ show: !0,
25
+ rotate: t.options.xAxis?.label?.rotation || 45
26
+ // 文字顺时针旋转 90°(完全竖向)
27
+ },
28
+ min: t.options.xAxis?.min || void 0,
29
+ // 固定X轴最小值
30
+ max: t.options.xAxis?.max || void 0,
31
+ // 固定X轴最大值
32
+ title: t.options.xAxis?.title?.text,
33
+ position: t.options.xAxis?.position
34
+ },
35
+ yAxis: {
36
+ axisLabel: {
37
+ color: "#666666",
38
+ fontSize: 10,
39
+ show: !0,
40
+ rotate: t.options.yAxis?.label?.rotation || 45
41
+ // 文字顺时针旋转 90°(完全竖向)
42
+ },
43
+ min: t.options.yAxis?.min || void 0,
44
+ // 固定X轴最小值
45
+ max: t.options.yAxis?.max || void 0,
46
+ // 固定X轴最大值
47
+ title: t.options.yAxis?.title?.text,
48
+ position: t.options.yAxis?.position
49
+ },
50
+ grid: {
51
+ top: 20,
52
+ bottom: 20,
53
+ left: 20,
54
+ right: 30
55
+ },
56
+ tooltip: {
57
+ trigger: "item",
58
+ // 触发方式:axis(坐标轴触发)/ item(数据项触发)/ none(不触发)
59
+ axisPointer: {
60
+ // 坐标轴指示器(仅 trigger: 'axis' 时生效)
61
+ type: "shadow"
62
+ // 指示器类型:line(直线)/ shadow(阴影)/ cross(十字线)
63
+ },
64
+ textStyle: {
65
+ // 提示框文本样式
66
+ fontSize: 14,
67
+ color: "#333"
68
+ },
69
+ backgroundColor: "#fff",
70
+ // 背景色(支持透明)
71
+ borderColor: "#fff",
72
+ // 边框颜色
73
+ borderWidth: 1,
74
+ // 边框宽度
75
+ padding: 10,
76
+ // 内边距(上下左右)
77
+ borderRadius: 4,
78
+ // 圆角半径
79
+ formatter: (o) => {
80
+ let n = `<div>${o.seriesName}</div>`;
81
+ return n += `<div><span>${t.options.xFields[0].title}:</span><span>${o.value[0]}</span></div>`, n += `<div><span>${t.options.yFields[0].title}:</span><span>${o.value[1]}</span></div>`, o.componentType === "series" ? n : "";
82
+ },
83
+ triggerOn: "mousemove",
84
+ // 触发时机:mousemove(鼠标移动)/ click(点击)/ mousemove|click(两者)
85
+ showDelay: 0,
86
+ // 显示延迟(ms),默认0
87
+ hideDelay: 100,
88
+ // 隐藏延迟(ms),默认100
89
+ enterable: !1
90
+ // 是否允许鼠标进入提示框(默认false,防止触发其他交互)
91
+ },
92
+ legend: {
93
+ show: t.options.legend.enable,
94
+ orient: ["left", "right"].includes(t.options.legend.position) ? "vertical" : "horizontal",
95
+ // 纵向布局
96
+ left: ["left", "right"].includes(t.options.legend.position) && t.options.legend.position || "center",
97
+ // 居右
98
+ top: ["top", "bottom"].includes(t.options.legend.position) && t.options.legend.position || "middle",
99
+ // 垂直居中
100
+ // itemGap: 10, // 图例项间距 20px
101
+ bottom: 0,
102
+ padding: 10,
103
+ itemWidth: 12,
104
+ itemHeight: 12,
105
+ textStyle: {
106
+ fontStyle: "normal"
107
+ }
108
+ },
109
+ graphic: t.options.guideline?.map((o) => ({
110
+ type: "line",
111
+ // 类型:线
112
+ shape: {
113
+ x1: 1,
114
+ y1: 8,
115
+ // 起点(X=0,Y=50)
116
+ x2: 2,
117
+ y2: 8
118
+ // 终点(X=100,Y=50)→ 水平
119
+ },
120
+ style: {
121
+ stroke: o.color,
122
+ // 线条颜色
123
+ lineWidth: 2
124
+ // 线条宽度
125
+ }
126
+ })),
127
+ series: t.dataList.map((o, n) => ({
128
+ symbolSize: () => (o.data[2] || 0) >= t.options.bubbleOptions.maxSize ? t.options.bubbleOptions.maxSize : (o.data[2] || 0) <= t.options.bubbleOptions.minSize ? t.options.bubbleOptions.minSize : o.data[2] || 10,
129
+ //气泡大小
130
+ data: [o.data],
131
+ name: o.name,
132
+ markLine: {
133
+ // 1. 标记线整体样式
134
+ symbol: ["none", "none"],
135
+ // 起点/终点标记图形(默认有箭头,none 隐藏)
136
+ lineStyle: {
137
+ // 线的样式
138
+ width: 1,
139
+ type: "dashed"
140
+ // solid/dashed/dotted
141
+ },
142
+ // 2. 标记线的数据(关键)
143
+ data: n === 0 && t.options.guideline?.map((e) => {
144
+ const i = {
145
+ lineStyle: {
146
+ // 线的样式
147
+ color: e.color,
148
+ width: 1,
149
+ type: "dashed"
150
+ // solid/dashed/dotted
151
+ },
152
+ label: {
153
+ show: !0,
154
+ position: "end",
155
+ // 标签位置:start/middle/end
156
+ formatter: (a) => {
157
+ if (e.is_label_visible && e.is_value_visible)
158
+ return e.label + ":" + a.value;
159
+ if (e.is_label_visible)
160
+ return e.label;
161
+ if (e.is_value_visible)
162
+ return a.value;
163
+ },
164
+ // 格式化文本({b}名称,{c}数值)
165
+ fontSize: 12,
166
+ color: e.color
167
+ }
168
+ };
169
+ return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (i.xAxis = e.value || 0), e.field === t.options.yFields[0].tag && (i.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (i.xAxis = l.max), e.aggregate === "min" && (i.xAxis = l.min), e.aggregate === "avg" && (i.xAxis = l.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (i.yAxis = s.max), e.aggregate === "min" && (i.yAxis = s.min), e.aggregate === "avg" && (i.yAxis = s.avg)), i.type, e.aggregate), i;
170
+ })
171
+ },
172
+ color: f.find((e) => e.title === o.name) ? f.find((e) => e.title === o.name).color : "",
173
+ label: {
174
+ show: t.options.chart_label.enable,
175
+ position: "top",
176
+ // 文本在气泡上方
177
+ distance: 5,
178
+ // 与气泡的距离(避免紧贴)
179
+ formatter: () => `${t.options.chart_label.dimension?.enable ? o.name : ""} ${t.options.chart_label.value?.enable ? "(" + o.data[0] + "," + o.data[1] + ")" : ""}`,
180
+ textStyle: {
181
+ fontSize: 11,
182
+ color: "#666",
183
+ fontWeight: 500
184
+ // 加粗
185
+ }
186
+ },
187
+ itemStyle: {
188
+ borderColor: "#666",
189
+ // 气泡边框色
190
+ borderWidth: 1,
191
+ // 边框宽度
192
+ // 阴影核心配置
193
+ shadowColor: "rgba(0, 0, 0, 0.2)",
194
+ // 阴影颜色(半透明黑色,柔和不突兀)
195
+ shadowBlur: 10,
196
+ // 阴影模糊度(10 为适中值,越大越柔和)
197
+ shadowOffsetX: 3,
198
+ // 水平偏移 3px(向右)
199
+ shadowOffsetY: 5,
200
+ // 垂直偏移 3px(向下)
201
+ shadowOpacity: 0.8,
202
+ // 阴影透明度(0.8 适中,避免过暗)
203
+ color: new A(0.4, 0.3, 1, [
204
+ {
205
+ offset: 0,
206
+ color: o.color && o.color[0] || "rgb(129, 227, 238)"
207
+ },
208
+ {
209
+ offset: 1,
210
+ color: o.color && o.color[1] || "rgb(25, 183, 207)"
211
+ }
212
+ ])
213
+ },
214
+ type: "scatter"
215
+ }))
216
+ };
217
+ return m(g, () => ({
218
+ resizeEchart: () => {
219
+ r.current.resizeEchart();
220
+ }
221
+ })), /* @__PURE__ */ h(
222
+ S,
223
+ {
224
+ ref: r,
225
+ option: u,
226
+ options: t.options,
227
+ dataList: t.dataList,
228
+ onChartReady: t.onChartReady,
229
+ onChartClick: t.onChartClick
230
+ }
231
+ );
232
+ }, F = y(w);
233
+ export {
234
+ F as B
235
+ };
@@ -0,0 +1,6 @@
1
+ export * from '../components/BubbleChart/index'
2
+ export {}
3
+ import _default from '../components/BubbleChart/index'
4
+ export default _default
5
+ export * from '../components/BubbleChart/index'
6
+ export {}
@@ -0,0 +1,4 @@
1
+ import { B as r } from "./BubbleChart-D5Ro_YLD.js";
2
+ export {
3
+ r as default
4
+ };
@@ -1,13 +1,8 @@
1
- import { jsxs as A, jsx as a } from "react/jsx-runtime";
2
- import { useRef as y, useEffect as m } from "react";
3
- import { d as _, i as w } from "../vendors/echarts.js";
4
- import { c as g } from "../vendors/clsx.js";
5
- const f = {
6
- "scatter-plot-page": "_scatter-plot-page_1h1ig_1",
7
- "xAxis-title": "_xAxis-title_1h1ig_6",
8
- "yAxis-title": "_yAxis-title_1h1ig_11"
9
- }, R = (t) => {
10
- const r = y(null), d = y(null), v = (i) => {
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import { forwardRef as b, useRef as v, useImperativeHandle as m } from "react";
3
+ import { A } from "../BubbleChart/AutoGridEChart-DubWMmib.js";
4
+ const S = (t, c) => {
5
+ const d = v(null), f = (i) => {
11
6
  const n = {
12
7
  index0: [],
13
8
  // 所有系列的第一个数据(data[0])
@@ -17,10 +12,10 @@ const f = {
17
12
  return i.forEach((e) => {
18
13
  n.index0.push(e.data[0]), n.index1.push(e.data[1]);
19
14
  }), n;
20
- }, u = (i) => {
21
- const n = Math.max(...i), e = Math.min(...i), o = (i.reduce((l, b) => l + b, 0) / i.length).toFixed(2);
15
+ }, r = (i) => {
16
+ const n = Math.max(...i), e = Math.min(...i), o = (i.reduce((a, h) => a + h, 0) / i.length).toFixed(2);
22
17
  return { max: n, min: e, avg: Number(o) };
23
- }, h = v(t.dataList), x = u(h.index0), c = u(h.index1), s = {
18
+ }, x = f(t.dataList), l = r(x.index0), s = r(x.index1), g = t.options.xFields[t.options.xFields.length - 1].colors || [], u = {
24
19
  xAxis: {
25
20
  axisLabel: {
26
21
  color: "#666666",
@@ -95,8 +90,14 @@ const f = {
95
90
  // 居右
96
91
  top: ["top", "bottom"].includes(t.options.legend.position) && t.options.legend.position || "middle",
97
92
  // 垂直居中
98
- itemGap: 20
99
- // 图例项间距 20px
93
+ // itemGap: 10, // 图例项间距 20px
94
+ bottom: 0,
95
+ padding: 10,
96
+ itemWidth: 12,
97
+ itemHeight: 12,
98
+ textStyle: {
99
+ fontStyle: "normal"
100
+ }
100
101
  },
101
102
  graphic: t.options.guideline?.map((i) => ({
102
103
  type: "line",
@@ -145,30 +146,30 @@ const f = {
145
146
  show: !0,
146
147
  position: "end",
147
148
  // 标签位置:start/middle/end
148
- formatter: (l) => {
149
+ formatter: (a) => {
149
150
  if (e.is_label_visible && e.is_value_visible)
150
- return e.label + ":" + l.value;
151
+ return e.label + ":" + a.value;
151
152
  if (e.is_label_visible)
152
153
  return e.label;
153
154
  if (e.is_value_visible)
154
- return l.value;
155
+ return a.value;
155
156
  },
156
157
  // 格式化文本({b}名称,{c}数值)
157
158
  fontSize: 12,
158
159
  color: e.color
159
160
  }
160
161
  };
161
- return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (o.xAxis = e.value || 0), e.field === t.options.yFields[0].tag && (o.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (o.xAxis = x.max), e.aggregate === "min" && (o.xAxis = x.min), e.aggregate === "avg" && (o.xAxis = x.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (o.yAxis = c.max), e.aggregate === "min" && (o.yAxis = c.min), e.aggregate === "avg" && (o.yAxis = c.avg)), o.type, e.aggregate), o;
162
+ return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (o.xAxis = e.value || 0), e.field === t.options.yFields[0].tag && (o.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (o.xAxis = l.max), e.aggregate === "min" && (o.xAxis = l.min), e.aggregate === "avg" && (o.xAxis = l.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (o.yAxis = s.max), e.aggregate === "min" && (o.yAxis = s.min), e.aggregate === "avg" && (o.yAxis = s.avg)), o.type, e.aggregate), o;
162
163
  })
163
164
  },
164
- color: "",
165
+ color: g.find((e) => e.title === i.name) ? g.find((e) => e.title === i.name).color : "",
165
166
  label: {
166
167
  show: t.options.chart_label.enable,
167
168
  position: "top",
168
169
  // 文本在散点上方
169
170
  distance: 5,
170
171
  // 与散点的距离(避免紧贴)
171
- formatter: () => `${t.options.chart_label.dimension.enable ? i.name : ""} ${t.options.chart_label.value.enable ? "(" + i.data[0] + "," + i.data[1] + ")" : ""}`,
172
+ formatter: () => `${t.options.chart_label.dimension?.enable ? i.name : ""} ${t.options.chart_label.value?.enable ? "(" + i.data[0] + "," + i.data[1] + ")" : ""}`,
172
173
  textStyle: {
173
174
  fontSize: 11,
174
175
  color: "#666",
@@ -178,38 +179,23 @@ const f = {
178
179
  },
179
180
  type: "scatter"
180
181
  }))
181
- }, p = () => {
182
- if (!r.current) return;
183
- d.current && _(d.current);
184
- const i = w(r.current);
185
- d.current = i, i.setOption(s), t.onChartReady && t.onChartReady(i);
186
- const n = () => {
187
- i.resize();
188
- };
189
- return window.addEventListener("resize", n), () => {
190
- window.removeEventListener("resize", n), i.dispose();
191
- };
192
182
  };
193
- return m(() => p(), [s]), /* @__PURE__ */ A("div", { className: g(f["scatter-plot-page"]), children: [
194
- /* @__PURE__ */ a("div", { ref: r, style: { width: "100%", height: "100%" } }),
195
- /* @__PURE__ */ a(
196
- "div",
197
- {
198
- className: g(f["xAxis-title"]),
199
- style: s.xAxis?.position === "bottom" ? { bottom: "20px" } : s.xAxis?.position === "top" ? { top: "20px" } : void 0,
200
- children: /* @__PURE__ */ a("span", { children: s.xAxis?.title })
201
- }
202
- ),
203
- /* @__PURE__ */ a(
204
- "div",
205
- {
206
- className: g(f["yAxis-title"]),
207
- style: s.yAxis?.position === "left" ? { left: "20px" } : s.yAxis?.position === "right" ? { right: "20px" } : void 0,
208
- children: /* @__PURE__ */ a("span", { children: s.yAxis?.title })
209
- }
210
- )
211
- ] });
212
- };
183
+ return m(c, () => ({
184
+ resizeEchart: () => {
185
+ d.current.resizeEchart();
186
+ }
187
+ })), /* @__PURE__ */ y(
188
+ A,
189
+ {
190
+ ref: d,
191
+ option: u,
192
+ options: t.options,
193
+ dataList: t.dataList,
194
+ onChartReady: t.onChartReady,
195
+ onChartClick: t.onChartClick
196
+ }
197
+ );
198
+ }, z = b(S);
213
199
  export {
214
- R as S
200
+ z as S
215
201
  };
@@ -1,4 +1,4 @@
1
- import { S as a } from "./Scatterplot-CD1c18zN.js";
1
+ import { S as a } from "./Scatterplot-DzgKCqsu.js";
2
2
  export {
3
3
  a as default
4
4
  };
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { EChartsType } from 'echarts';
3
+ interface AutoGridEChartProps {
4
+ option: any;
5
+ options: any;
6
+ dataList: any[];
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ ref?: React.Ref<unknown> | undefined;
10
+ onChartReady?: (instance: EChartsType) => void;
11
+ onChartClick?: (params: any, options: any, dataList: any[]) => void;
12
+ }
13
+ declare const _default: React.ForwardRefExoticComponent<Omit<AutoGridEChartProps, "ref"> & React.RefAttributes<unknown>>;
14
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { BubbleChartConfig } from './BubbleChart.type';
2
+ declare const _default: import('react').ForwardRefExoticComponent<BubbleChartConfig & import('react').RefAttributes<unknown>>;
3
+ export default _default;
@@ -0,0 +1,71 @@
1
+ type BubbleChartConfig = {
2
+ options: {
3
+ bubbleOptions: {
4
+ displayNegative: boolean;
5
+ shadow: boolean;
6
+ minSize: number;
7
+ maxSize: number;
8
+ field?: Object;
9
+ };
10
+ metrics: Array<any>;
11
+ xFields: Array<any>;
12
+ yFields: Array<any>;
13
+ xAxis?: {
14
+ label?: {
15
+ rotation: number;
16
+ step: boolean;
17
+ };
18
+ title?: {
19
+ text: string;
20
+ };
21
+ min?: number;
22
+ max?: number;
23
+ position?: string;
24
+ };
25
+ yAxis?: {
26
+ label?: {
27
+ rotation: number;
28
+ };
29
+ min?: number;
30
+ max?: number;
31
+ title?: {
32
+ text: string;
33
+ };
34
+ position?: string;
35
+ };
36
+ chart_label: {
37
+ enable: boolean;
38
+ dimension?: {
39
+ enable: boolean;
40
+ };
41
+ value?: {
42
+ enable: boolean;
43
+ };
44
+ value_percent?: {
45
+ enable: boolean;
46
+ };
47
+ };
48
+ legend: {
49
+ enable: boolean;
50
+ position: string;
51
+ };
52
+ guideline?: Array<{
53
+ label: string;
54
+ type: string;
55
+ color: string;
56
+ is_label_visible: boolean;
57
+ is_value_visible: boolean;
58
+ field?: string;
59
+ value?: number;
60
+ aggregate?: string;
61
+ }>;
62
+ };
63
+ dataList: Array<{
64
+ color?: any;
65
+ data: [number, number, number, string, string | number];
66
+ name: string;
67
+ }>;
68
+ onChartReady?: (data: any) => void;
69
+ onChartClick?: (data: any, options: any, dataList: any) => void;
70
+ };
71
+ export type { BubbleChartConfig };
@@ -0,0 +1,3 @@
1
+ import { default as BubbleChart } from './BubbleChart';
2
+ export default BubbleChart;
3
+ export type * from './BubbleChart.type';
@@ -1,3 +1,3 @@
1
1
  import { ScatterplotConfig } from './Scatterplot.type';
2
- declare const Scatterplot: React.FC<ScatterplotConfig>;
3
- export default Scatterplot;
2
+ declare const _default: import('react').ForwardRefExoticComponent<ScatterplotConfig & import('react').RefAttributes<unknown>>;
3
+ export default _default;
@@ -27,13 +27,16 @@ type ScatterplotConfig = {
27
27
  position?: string;
28
28
  };
29
29
  chart_label: {
30
- value: {
30
+ enable: boolean;
31
+ dimension?: {
31
32
  enable: boolean;
32
33
  };
33
- dimension: {
34
+ value?: {
35
+ enable: boolean;
36
+ };
37
+ value_percent?: {
34
38
  enable: boolean;
35
39
  };
36
- enable: boolean;
37
40
  };
38
41
  legend: {
39
42
  enable: boolean;
@@ -55,5 +58,6 @@ type ScatterplotConfig = {
55
58
  name: string;
56
59
  }>;
57
60
  onChartReady?: (data: any) => void;
61
+ onChartClick?: (data: any, options: any, dataList: any) => void;
58
62
  };
59
63
  export type { ScatterplotConfig };
@@ -1,4 +1,5 @@
1
1
  export { default as DeptsMemberSelector } from './DeptsMember/DeptsMember';
2
2
  export { default as ConfigProvider } from './ConfigProvider/ConfigProvider';
3
+ export { default as BubbleChart } from './BubbleChart/BubbleChart';
3
4
  export { default as Scatterplot } from './Scatterplot/Scatterplot';
4
5
  export type { ConfigProps, Locale, PreFetchedNode } from './ConfigProvider/ConfigProvider.type';