@baishuyun/ui-business 6.0.1 → 6.0.3

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.
@@ -102,15 +102,15 @@ function l(e, t, n, r, i) {
102
102
  })(),
103
103
  bottom: (() => {
104
104
  let t = 20;
105
- return e.xAxis.position === "bottom" && (t += C + 10), e.legend.show && e.legend.top === "bottom" && (T += S, t += S), e.xAxis.title !== "" && e.xAxis.position === "bottom" && (t += 30), t;
105
+ return ["bottom", "zero"].includes(e.xAxis.position) && (t += C + 10), e.legend.show && (e.legend.top === "bottom" || e.legend.top === "zero") && (T += S, t += S), e.xAxis.title !== "" && (e.legend.top === "bottom" || e.xAxis.position === "zero") && (t += 30), t;
106
106
  })(),
107
107
  left: (() => {
108
108
  let t = 20;
109
- return e.yAxis.position === "left" && (t += w), e.legend.show && e.legend.left === "left" && (D += v, t += v), e.yAxis.title !== "" && e.yAxis.position === "left" && (t += 10), t;
109
+ return ["left", "zero"].includes(e.yAxis.position) && (t += w), e.legend.show && (e.legend.left === "left" || e.legend.left === "zero") && (D += v, t += v), e.yAxis.title !== "" && (e.yAxis.position === "left" || e.yAxis.position === "zero") && (t += 10), t;
110
110
  })(),
111
111
  right: (() => {
112
112
  let t = 20;
113
- return e.yAxis.position === "right" && (t += w + 10), e.legend.show && e.legend.left === "right" && (console.info("legendSideWidth", e, v), O += v, t += v), e.yAxis.title !== "" && e.yAxis.position === "right" && (t += 30), t;
113
+ return e.yAxis.position === "right" && (t += w + 10), e.legend.show && e.legend.left === "right" && (O += v, t += v), e.yAxis.title !== "" && e.yAxis.position === "right" && (t += 30), t;
114
114
  })()
115
115
  },
116
116
  titleBottomHeight: T,
@@ -136,7 +136,7 @@ var u = {
136
136
  if (!f.current) return;
137
137
  p.current = t(f.current);
138
138
  let e = v();
139
- console.info(1111, e), p.current.setOption(e, !0), p.current.on("click", function(e) {
139
+ p.current.setOption(e, !0), p.current.on("click", function(e) {
140
140
  n.onChartClick && n.onChartClick(e, n.options, n.dataList);
141
141
  });
142
142
  let r = () => {
@@ -154,7 +154,7 @@ var u = {
154
154
  if (!p.current) return;
155
155
  let e = v();
156
156
  p.current.setOption(e, !0);
157
- }, [n.option]), console.info(4545, n.option.yAxis?.position, h), /* @__PURE__ */ c("div", {
157
+ }, [n.option]), /* @__PURE__ */ c("div", {
158
158
  className: e(n.className, u["auto-grid-echart"]),
159
159
  children: [
160
160
  /* @__PURE__ */ s("div", {
@@ -167,12 +167,12 @@ var u = {
167
167
  }),
168
168
  /* @__PURE__ */ s("div", {
169
169
  className: e(u["xAxis-title"]),
170
- style: n.option.xAxis?.position === "bottom" ? { bottom: h.titleBottomHeight + 20 } : n.option.xAxis?.position === "top" ? { top: h.titleTopHeight + 20 } : void 0,
170
+ style: ["bottom", "zero"].includes(n.option.xAxis?.position) ? { bottom: h.titleBottomHeight + 20 } : n.option.xAxis?.position === "top" ? { top: h.titleTopHeight + 20 } : void 0,
171
171
  children: /* @__PURE__ */ s("span", { children: n.option.xAxis?.title })
172
172
  }),
173
173
  /* @__PURE__ */ s("div", {
174
174
  className: e(u["yAxis-title"]),
175
- style: n.option.yAxis?.position === "left" ? { left: h.titleLeftHeight } : n.option.yAxis?.position === "right" ? { right: h.titleRightHeight + 20 } : void 0,
175
+ style: ["left", "zero"].includes(n.option.yAxis?.position) ? { left: h.titleLeftHeight } : n.option.yAxis?.position === "right" ? { right: h.titleRightHeight + 20 } : void 0,
176
176
  children: /* @__PURE__ */ s("span", { children: n.option.yAxis?.title })
177
177
  })
178
178
  ]
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "../vendors/echarts.js";
2
- import { t } from "./AutoGridEChart-BQsZw7nv.js";
2
+ import { t } from "./AutoGridEChart-CUNnImhh.js";
3
3
  import { forwardRef as n, useImperativeHandle as r, useRef as i } from "react";
4
4
  import { jsx as a } from "react/jsx-runtime";
5
5
  var o = n((n, o) => {
@@ -24,24 +24,28 @@ var o = n((n, o) => {
24
24
  color: "#666666",
25
25
  fontSize: 10,
26
26
  show: !0,
27
+ hideOverlap: !n.options.xAxis?.label?.step,
27
28
  rotate: n.options.xAxis?.label?.rotation?.toString() || "45"
28
29
  },
29
30
  min: n.options.xAxis?.min || void 0,
30
31
  max: n.options.xAxis?.max || void 0,
31
32
  title: n.options.xAxis?.title?.text || "",
32
- position: n.options.xAxis?.position
33
+ position: n.options.xAxis?.position,
34
+ axisLine: { onZero: n.options.xAxis?.position === "zero" }
33
35
  },
34
36
  yAxis: {
35
37
  axisLabel: {
36
38
  color: "#666666",
37
39
  fontSize: 10,
38
40
  show: !0,
41
+ hideOverlap: !n.options.yAxis?.label?.step,
39
42
  rotate: n.options.yAxis?.label?.rotation + " " || 45
40
43
  },
41
44
  min: n.options.yAxis?.min || void 0,
42
45
  max: n.options.yAxis?.max || void 0,
43
46
  title: n.options.yAxis?.title?.text,
44
- position: n.options.yAxis?.position
47
+ position: n.options.yAxis?.position,
48
+ axisLine: { onZero: n.options.yAxis?.position === "zero" }
45
49
  },
46
50
  grid: {
47
51
  top: 20,
@@ -130,7 +134,10 @@ var o = n((n, o) => {
130
134
  return e.type === "fixed" && (e.field === n.options.xFields[0].tag && (t.xAxis = e.value || 0), (e.field === n.options.yFields[0].tag || e.field === "") && (t.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === n.options.xFields[0].tag && (e.aggregate === "max" && (t.xAxis = d.max), e.aggregate === "min" && (t.xAxis = d.min), e.aggregate === "avg" && (t.xAxis = d.avg)), e.field === n.options.yFields[0].tag && (e.aggregate === "max" && (t.yAxis = f.max), e.aggregate === "min" && (t.yAxis = f.min), e.aggregate === "avg" && (t.yAxis = f.avg)), t.type = e.aggregate), t;
131
135
  })
132
136
  },
133
- color: p.find((e) => e.title === t.name) ? p.find((e) => e.title === t.name).color : "",
137
+ color: (() => {
138
+ let e = p.find((e) => e.title === t.name);
139
+ return e ? e.color : "";
140
+ })(),
134
141
  label: {
135
142
  show: n.options.chart_label.enable,
136
143
  distance: 5,
@@ -1,6 +1,6 @@
1
1
  import "../vendors/echarts.js";
2
- import "./AutoGridEChart-BQsZw7nv.js";
3
- import { t as e } from "./BubbleChart-BN3msB5e.js";
2
+ import "./AutoGridEChart-CUNnImhh.js";
3
+ import { t as e } from "./BubbleChart-D2kLMmLH.js";
4
4
  //#region src/components/BubbleChart/index.ts
5
5
  var t = e;
6
6
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as e } from "../BubbleChart/AutoGridEChart-BQsZw7nv.js";
1
+ import { t as e } from "../BubbleChart/AutoGridEChart-CUNnImhh.js";
2
2
  import { forwardRef as t, useImperativeHandle as n, useRef as r } from "react";
3
3
  import { jsx as i } from "react/jsx-runtime";
4
4
  var a = t((t, a) => {
@@ -17,30 +17,36 @@ var a = t((t, a) => {
17
17
  min: n,
18
18
  avg: Number(r)
19
19
  };
20
- }, l = s(t.dataList), u = c(l.index0), d = c(l.index1), f = t.options.xFields[t.options.xFields.length - 1].colors || t.options.xFields[t.options.xFields.length - 1].color || [], p = {
20
+ }, l = s(t.dataList), u = c(l.index0), d = c(l.index1), f = t.options.xFields[t.options.xFields.length - 1].colors || t.options.xFields[t.options.xFields.length - 1].color || [];
21
+ console.info(t.options.xAxis?.label?.step);
22
+ let p = {
21
23
  xAxis: {
22
24
  axisLabel: {
23
25
  color: "#666666",
24
26
  fontSize: 10,
25
27
  show: !0,
28
+ hideOverlap: !t.options.xAxis?.label?.step,
26
29
  rotate: t.options.xAxis?.label?.rotation?.toString() || "45"
27
30
  },
28
31
  min: t.options.xAxis?.min || void 0,
29
32
  max: t.options.xAxis?.max || void 0,
30
33
  title: t.options.xAxis?.title?.text || "",
31
- position: t.options.xAxis?.position
34
+ position: t.options.xAxis?.position,
35
+ axisLine: { onZero: t.options.xAxis?.position === "zero" }
32
36
  },
33
37
  yAxis: {
34
38
  axisLabel: {
35
- color: "#666666",
39
+ color: "#666",
36
40
  fontSize: 10,
37
41
  show: !0,
42
+ hideOverlap: !t.options.yAxis?.label?.step,
38
43
  rotate: t.options.yAxis?.label?.rotation?.toString() || "45"
39
44
  },
40
45
  min: t.options.yAxis?.min || void 0,
41
46
  max: t.options.yAxis?.max || void 0,
42
47
  title: t.options.yAxis?.title?.text,
43
- position: t.options.yAxis?.position
48
+ position: t.options.yAxis?.position,
49
+ axisLine: { onZero: t.options.yAxis?.position === "zero" }
44
50
  },
45
51
  tooltip: {
46
52
  trigger: "item",
@@ -122,7 +128,10 @@ var a = t((t, a) => {
122
128
  return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (n.xAxis = e.value || 0), (e.field === t.options.yFields[0].tag || e.field === "") && (n.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (n.xAxis = u.max), e.aggregate === "min" && (n.xAxis = u.min), e.aggregate === "avg" && (n.xAxis = u.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (n.yAxis = d.max), e.aggregate === "min" && (n.yAxis = d.min), e.aggregate === "avg" && (n.yAxis = d.avg)), n.type = e.aggregate), n;
123
129
  })
124
130
  },
125
- color: f.find((t) => t.title === e.name) ? f.find((t) => t.title === e.name).color : "",
131
+ color: (() => {
132
+ let t = f.find((t) => t.title === e.name);
133
+ return t ? t.color : "";
134
+ })(),
126
135
  label: {
127
136
  show: t.options.chart_label.enable,
128
137
  position: "top",
@@ -1,6 +1,6 @@
1
1
  import "../vendors/echarts.js";
2
- import "../BubbleChart/AutoGridEChart-BQsZw7nv.js";
3
- import { t as e } from "./Scatterplot-BZC0IKc0.js";
2
+ import "../BubbleChart/AutoGridEChart-CUNnImhh.js";
3
+ import { t as e } from "./Scatterplot-BLA2S8uv.js";
4
4
  //#region src/components/Scatterplot/index.ts
5
5
  var t = e;
6
6
  //#endregion
@@ -25,6 +25,7 @@ type BubbleChartConfig = {
25
25
  yAxis?: {
26
26
  label?: {
27
27
  rotation: number;
28
+ step: boolean;
28
29
  };
29
30
  min?: number;
30
31
  max?: number;
@@ -18,6 +18,7 @@ type ScatterplotConfig = {
18
18
  yAxis?: {
19
19
  label?: {
20
20
  rotation: number;
21
+ step: boolean;
21
22
  };
22
23
  min?: number;
23
24
  max?: number;
package/dist/index.js CHANGED
@@ -15,9 +15,9 @@ import "./DeptsMemberSelector/Member-BY8mtQb0.js";
15
15
  import "./DeptsMemberSelector/Department-6R-BZNZ4.js";
16
16
  import { t as s } from "./ConfigProvider/ConfigProvider-CU5Z39Ex.js";
17
17
  import { t as c } from "./vendors/echarts.js";
18
- import "./BubbleChart/AutoGridEChart-BQsZw7nv.js";
19
- import { t as l } from "./BubbleChart/BubbleChart-BN3msB5e.js";
20
- import { t as u } from "./Scatterplot/Scatterplot-BZC0IKc0.js";
18
+ import "./BubbleChart/AutoGridEChart-CUNnImhh.js";
19
+ import { t as l } from "./BubbleChart/BubbleChart-D2kLMmLH.js";
20
+ import { t as u } from "./Scatterplot/Scatterplot-BLA2S8uv.js";
21
21
  import { forwardRef as d, useEffect as f, useImperativeHandle as p, useRef as m } from "react";
22
22
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
23
23
  //#region src/components/ProgressChart/ProgressChart.module.scss
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-business",
3
- "version": "6.0.1",
3
+ "version": "6.0.3",
4
4
  "description": "百数云业务组件库",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",