@lobehub/charts 5.5.1 → 5.7.0

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 (42) hide show
  1. package/es/AccuracyBarChart/index.js +3 -3
  2. package/es/AreaChart/index.js +3 -3
  3. package/es/BarChart/index.js +3 -3
  4. package/es/BarList/index.js +3 -3
  5. package/es/BenchmarkColumnChart/index.js +3 -3
  6. package/es/BenchmarkRankingChart/index.js +11 -4
  7. package/es/BenchmarkScatterChart/index.d.ts +145 -0
  8. package/es/BenchmarkScatterChart/index.js +857 -0
  9. package/es/BenchmarkScatterChart/index.mdx +61 -0
  10. package/es/BenchmarkScatterChart/styles.d.ts +25 -0
  11. package/es/BenchmarkScatterChart/styles.js +33 -0
  12. package/es/BenchmarkScatterChart/utils.d.ts +55 -0
  13. package/es/BenchmarkScatterChart/utils.js +353 -0
  14. package/es/ComposedChart/index.js +3 -3
  15. package/es/DataBars/CategoryBar.js +2 -1
  16. package/es/DataBars/DeltaBar.js +2 -1
  17. package/es/DataBars/MarkerBar.js +2 -1
  18. package/es/DataBars/ProgressBar.js +2 -1
  19. package/es/DonutChart/index.js +3 -3
  20. package/es/FunnelChart/index.js +3 -3
  21. package/es/Heatmaps/Calendar.js +1 -1
  22. package/es/Heatmaps/index.js +2 -1
  23. package/es/Legend/LegendItem.js +2 -2
  24. package/es/Legend/ScrollButton.js +1 -1
  25. package/es/LineChart/index.js +3 -3
  26. package/es/RadarChart/index.js +3 -3
  27. package/es/ScatterChart/ScatterChartTooltip.js +2 -2
  28. package/es/ScatterChart/ScatterChartTooltipRow.js +3 -3
  29. package/es/ScatterChart/index.js +3 -3
  30. package/es/SparkChart/SparkAreaChart.js +3 -3
  31. package/es/SparkChart/SparkBarChart.js +3 -3
  32. package/es/SparkChart/SparkLineChart.js +3 -3
  33. package/es/Tracker/TrackerBlock.js +2 -1
  34. package/es/Tracker/index.js +2 -1
  35. package/es/common/ChartTooltip/ChartTooltipRow.js +3 -3
  36. package/es/common/ChartTooltip/index.js +2 -2
  37. package/es/common/NoData.js +5 -22
  38. package/es/common/benchmark/index.d.ts +1 -1
  39. package/es/common/benchmark/types.d.ts +6 -1
  40. package/es/index.d.ts +2 -1
  41. package/es/index.js +1 -0
  42. package/package.json +4 -4
@@ -9,7 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
- import { Flexbox, TooltipGroup } from '@lobehub/ui';
12
+ import { Flexbox } from '@lobehub/ui';
13
+ import { TooltipGroup } from '@lobehub/ui/base-ui';
13
14
  import { cx, useTheme, useThemeMode } from 'antd-style';
14
15
  import { getYear, parseISO } from 'date-fns';
15
16
  import { forwardRef, useMemo } from 'react';
@@ -1,7 +1,7 @@
1
1
  var _templateObject, _templateObject2, _templateObject3;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox, Icon } from '@lobehub/ui';
4
- import { Typography } from 'antd';
4
+ import { Text } from '@lobehub/ui/base-ui';
5
5
  import { createStaticStyles, cssVar, cx } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import { memo } from 'react';
@@ -43,7 +43,7 @@ var LegendItem = /*#__PURE__*/memo(function (_ref2) {
43
43
  style: {
44
44
  opacity: activeLegend && activeLegend !== name ? 0.4 : 1
45
45
  }
46
- }), /*#__PURE__*/_jsx(Typography.Paragraph, {
46
+ }), /*#__PURE__*/_jsx(Text, {
47
47
  className: styles.itemContent,
48
48
  ellipsis: true,
49
49
  style: {
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { Icon } from '@lobehub/ui';
8
- import { Button } from 'antd';
8
+ import { Button } from '@lobehub/ui/base-ui';
9
9
  import { memo, useEffect, useRef, useState } from 'react';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  var ScrollButton = /*#__PURE__*/memo(function (_ref) {
@@ -17,7 +17,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
- import { Flexbox, Skeleton } from '@lobehub/ui';
20
+ import { Flexbox } from '@lobehub/ui';
21
+ import { Skeleton } from '@lobehub/ui/base-ui';
21
22
  import { css, cssVar, cx } from 'antd-style';
22
23
  import { Fragment, forwardRef, useMemo, useState } from 'react';
23
24
  import { CartesianGrid, Dot, Label, Legend, Line, LineChart as ReChartsLineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
@@ -117,8 +118,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
117
118
  valueFormatter: valueFormatter
118
119
  });
119
120
  }, [yAxisWidth, data, valueFormatter, index]);
120
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
121
- active: true,
121
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
122
122
  height: height,
123
123
  width: width
124
124
  });
@@ -19,7 +19,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
21
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
- import { Flexbox, Skeleton } from '@lobehub/ui';
22
+ import { Flexbox } from '@lobehub/ui';
23
+ import { Skeleton } from '@lobehub/ui/base-ui';
23
24
  import { cssVar } from 'antd-style';
24
25
  import { forwardRef, useState } from 'react';
25
26
  import { Legend, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart as ReChartsRadarChart, ResponsiveContainer, Tooltip } from 'recharts';
@@ -94,8 +95,7 @@ var RadarChart = /*#__PURE__*/forwardRef(function (props, ref) {
94
95
  _useState4 = _slicedToArray(_useState3, 2),
95
96
  legendHeight = _useState4[0],
96
97
  setLegendHeight = _useState4[1];
97
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
98
- active: true,
98
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
99
99
  height: height,
100
100
  width: width
101
101
  });
@@ -1,7 +1,7 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox, Icon } from '@lobehub/ui';
4
- import { Typography } from 'antd';
4
+ import { Text } from '@lobehub/ui/base-ui';
5
5
  import { createStaticStyles, cssVar, cx } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import React, { memo } from 'react';
@@ -41,7 +41,7 @@ var ScatterChartTooltip = /*#__PURE__*/memo(function (_ref2) {
41
41
  fill: color,
42
42
  icon: Circle,
43
43
  size: 10
44
- }), /*#__PURE__*/_jsx(Typography.Paragraph, {
44
+ }), /*#__PURE__*/_jsx(Text, {
45
45
  ellipsis: true,
46
46
  style: {
47
47
  margin: 0
@@ -1,7 +1,7 @@
1
1
  var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox } from '@lobehub/ui';
4
- import { Typography } from 'antd';
4
+ import { Text } from '@lobehub/ui/base-ui';
5
5
  import { createStaticStyles, cssVar } from 'antd-style';
6
6
  import React, { memo } from 'react';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -21,14 +21,14 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
21
21
  gap: 32,
22
22
  horizontal: true,
23
23
  justify: 'space-between',
24
- children: [/*#__PURE__*/_jsx(Typography.Paragraph, {
24
+ children: [/*#__PURE__*/_jsx(Text, {
25
25
  className: styles.title,
26
26
  ellipsis: true,
27
27
  style: {
28
28
  margin: 0
29
29
  },
30
30
  children: name
31
- }), /*#__PURE__*/_jsx(Typography.Paragraph, {
31
+ }), /*#__PURE__*/_jsx(Text, {
32
32
  className: styles.number,
33
33
  style: {
34
34
  margin: 0
@@ -17,7 +17,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
- import { Flexbox, Skeleton } from '@lobehub/ui';
20
+ import { Flexbox } from '@lobehub/ui';
21
+ import { Skeleton } from '@lobehub/ui/base-ui';
21
22
  import { css, cssVar, cx } from 'antd-style';
22
23
  import { forwardRef, useMemo, useState } from 'react';
23
24
  import { CartesianGrid, Label, Legend, ScatterChart as ReChartsScatterChart, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';
@@ -125,8 +126,7 @@ var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
125
126
  valueFormatter: valueFormatter === null || valueFormatter === void 0 ? void 0 : valueFormatter.y
126
127
  });
127
128
  }, [yAxisWidth, data, valueFormatter, y]);
128
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
129
- active: true,
129
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
130
130
  height: height,
131
131
  width: width
132
132
  });
@@ -11,7 +11,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
- import { Flexbox, Skeleton } from '@lobehub/ui';
14
+ import { Flexbox } from '@lobehub/ui';
15
+ import { Skeleton } from '@lobehub/ui/base-ui';
15
16
  import { css, cssVar, cx } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
18
  import { Area, AreaChart as ReChartsAreaChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
@@ -55,8 +56,7 @@ var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
55
56
  height = _props$height === void 0 ? 48 : _props$height,
56
57
  style = props.style,
57
58
  rest = _objectWithoutProperties(props, _excluded);
58
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
59
- active: true,
59
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
60
60
  height: height,
61
61
  width: width
62
62
  });
@@ -11,7 +11,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
- import { Flexbox, Skeleton } from '@lobehub/ui';
14
+ import { Flexbox } from '@lobehub/ui';
15
+ import { Skeleton } from '@lobehub/ui/base-ui';
15
16
  import { css, cssVar, cx } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
18
  import { Bar, BarChart as ReChartsBarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
@@ -51,8 +52,7 @@ var SparkBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
51
52
  height = _props$height === void 0 ? 48 : _props$height,
52
53
  style = props.style,
53
54
  rest = _objectWithoutProperties(props, _excluded);
54
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
55
- active: true,
55
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
56
56
  height: height,
57
57
  width: width
58
58
  });
@@ -11,7 +11,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
- import { Flexbox, Skeleton } from '@lobehub/ui';
14
+ import { Flexbox } from '@lobehub/ui';
15
+ import { Skeleton } from '@lobehub/ui/base-ui';
15
16
  import { css, cssVar, cx } from 'antd-style';
16
17
  import { forwardRef } from 'react';
17
18
  import { Line, LineChart as ReChartsLineChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
@@ -51,8 +52,7 @@ var SparkLineChart = /*#__PURE__*/forwardRef(function (props, ref) {
51
52
  style = props.style,
52
53
  loading = props.loading,
53
54
  rest = _objectWithoutProperties(props, _excluded);
54
- if (loading || !data) return /*#__PURE__*/_jsx(Skeleton.Block, {
55
- active: true,
55
+ if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
56
56
  height: height,
57
57
  width: width
58
58
  });
@@ -11,7 +11,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
11
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
12
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
14
- import { Flexbox, Tooltip } from '@lobehub/ui';
14
+ import { Flexbox } from '@lobehub/ui';
15
+ import { Tooltip } from '@lobehub/ui/base-ui';
15
16
  import { createStaticStyles, cssVar } from 'antd-style';
16
17
  import { forwardRef, useMemo } from 'react';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -9,7 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
- import { Flexbox, TooltipGroup } from '@lobehub/ui';
12
+ import { Flexbox } from '@lobehub/ui';
13
+ import { TooltipGroup } from '@lobehub/ui/base-ui';
13
14
  import { cx } from 'antd-style';
14
15
  import { forwardRef } from 'react';
15
16
  import TrackerBlock from "./TrackerBlock";
@@ -1,7 +1,7 @@
1
1
  var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox, Icon } from '@lobehub/ui';
4
- import { Typography } from 'antd';
4
+ import { Text } from '@lobehub/ui/base-ui';
5
5
  import { createStaticStyles } from 'antd-style';
6
6
  import { Circle } from 'lucide-react';
7
7
  import { memo } from 'react';
@@ -35,7 +35,7 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
35
35
  fill: color,
36
36
  icon: Circle,
37
37
  size: 10
38
- }), /*#__PURE__*/_jsx(Typography.Paragraph, {
38
+ }), /*#__PURE__*/_jsx(Text, {
39
39
  className: styles.title,
40
40
  ellipsis: true,
41
41
  style: {
@@ -43,7 +43,7 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
43
43
  },
44
44
  children: name
45
45
  })]
46
- }), /*#__PURE__*/_jsx(Typography.Paragraph, {
46
+ }), /*#__PURE__*/_jsx(Text, {
47
47
  className: styles.number,
48
48
  style: {
49
49
  margin: 0
@@ -1,7 +1,7 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { Flexbox } from '@lobehub/ui';
4
- import { Typography } from 'antd';
4
+ import { Text } from '@lobehub/ui/base-ui';
5
5
  import { createStaticStyles, cssVar, cx } from 'antd-style';
6
6
  import ChartTooltipFrame from "./ChartTooltipFrame";
7
7
  import ChartTooltipRow from "./ChartTooltipRow";
@@ -32,7 +32,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
32
32
  paddingBlock: 8,
33
33
  paddingInline: 16,
34
34
  width: 'auto',
35
- children: /*#__PURE__*/_jsx(Typography.Paragraph, {
35
+ children: /*#__PURE__*/_jsx(Text, {
36
36
  ellipsis: true,
37
37
  style: {
38
38
  margin: 0
@@ -1,9 +1,7 @@
1
- import { Center, Flexbox } from '@lobehub/ui';
2
- import { Empty } from 'antd';
3
- import { cssVar } from 'antd-style';
1
+ import { Center, Empty } from '@lobehub/ui';
2
+ import { Inbox } from 'lucide-react';
4
3
  import { isValidElement, memo } from 'react';
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
5
  var NoData = /*#__PURE__*/memo(function (_ref) {
8
6
  var _ref$noDataText = _ref.noDataText,
9
7
  noDataText = _ref$noDataText === void 0 ? {
@@ -17,24 +15,9 @@ var NoData = /*#__PURE__*/memo(function (_ref) {
17
15
  width: '100%',
18
16
  children: /*#__PURE__*/_jsx(Empty, {
19
17
  className: className,
20
- description: isReactNodeText ? noDataText : /*#__PURE__*/_jsxs(Flexbox, {
21
- padding: 8,
22
- children: [/*#__PURE__*/_jsx("div", {
23
- style: {
24
- color: cssVar.colorText,
25
- fontSize: 14,
26
- fontWeight: 'bold'
27
- },
28
- children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.title
29
- }), /*#__PURE__*/_jsx("div", {
30
- style: {
31
- color: cssVar.colorTextDescription,
32
- fontSize: 12
33
- },
34
- children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.desc
35
- })]
36
- }),
37
- image: Empty.PRESENTED_IMAGE_SIMPLE
18
+ description: isReactNodeText ? noDataText : noDataText === null || noDataText === void 0 ? void 0 : noDataText.desc,
19
+ icon: Inbox,
20
+ title: isReactNodeText ? undefined : noDataText === null || noDataText === void 0 ? void 0 : noDataText.title
38
21
  })
39
22
  });
40
23
  });
@@ -1,2 +1,2 @@
1
- export type { BenchmarkBaseProps, BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkRecord, BenchmarkRenderIcon, NormalizedBenchmarkItem, } from './types';
1
+ export type { BenchmarkBaseProps, BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkPointShape, BenchmarkRecord, BenchmarkRenderIcon, NormalizedBenchmarkItem, } from './types';
2
2
  export { DEFAULT_BENCHMARK_KEYS, defaultBenchmarkAccuracyFormatter, defaultBenchmarkErrorFormatter, defaultBenchmarkValueFormatter, formatBenchmarkAccuracyDisplay, getBenchmarkBarPercent, getBenchmarkIcon, getBenchmarkLabelMetrics, getBenchmarkMaxValue, normalizeBenchmarkData, resolveBenchmarkKeys, splitBenchmarkLabel, } from './utils';
@@ -17,15 +17,20 @@ export interface BenchmarkRecord {
17
17
  provider?: ReactNode;
18
18
  rank?: number;
19
19
  score?: number;
20
+ /**
21
+ * Marker shape used by scatter-style charts when no icon is provided
22
+ */
23
+ shape?: BenchmarkPointShape;
20
24
  target?: string;
21
25
  /**
22
26
  * Place item after a visual separator; line series does not connect into it
23
27
  */
24
28
  unranked?: boolean;
25
29
  }
30
+ export type BenchmarkPointShape = 'circle' | 'square' | 'diamond' | 'triangle';
26
31
  export type BenchmarkRenderIcon = (record: BenchmarkRecord, index: number) => ReactNode;
27
32
  export type BenchmarkEventProps = (BenchmarkRecord & {
28
- eventType: 'bar' | 'row';
33
+ eventType: 'bar' | 'row' | 'point';
29
34
  value: number;
30
35
  }) | null | undefined;
31
36
  export interface BenchmarkFieldKeys {
package/es/index.d.ts CHANGED
@@ -4,7 +4,8 @@ export { default as BarChart, type BarChartProps } from './BarChart';
4
4
  export { type Bar, default as BarList, type BarListProps } from './BarList';
5
5
  export { default as BenchmarkColumnChart, type BenchmarkColumnChartProps, } from './BenchmarkColumnChart';
6
6
  export { default as BenchmarkRankingChart, type BenchmarkRankingChartProps, } from './BenchmarkRankingChart';
7
- export type { BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkRecord, BenchmarkRenderIcon, } from './common/benchmark';
7
+ export { default as BenchmarkScatterChart, type BenchmarkScatterChartProps, type BenchmarkScatterMetric, } from './BenchmarkScatterChart';
8
+ export type { BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkPointShape, BenchmarkRecord, BenchmarkRenderIcon, } from './common/benchmark';
8
9
  export { default as ChartTooltip, type ChartTooltipProps } from './common/ChartTooltip';
9
10
  export { default as ChartTooltipFrame } from './common/ChartTooltip/ChartTooltipFrame';
10
11
  export { default as ChartTooltipRow } from './common/ChartTooltip/ChartTooltipRow';
package/es/index.js CHANGED
@@ -4,6 +4,7 @@ export { default as BarChart } from "./BarChart";
4
4
  export { default as BarList } from "./BarList";
5
5
  export { default as BenchmarkColumnChart } from "./BenchmarkColumnChart";
6
6
  export { default as BenchmarkRankingChart } from "./BenchmarkRankingChart";
7
+ export { default as BenchmarkScatterChart } from "./BenchmarkScatterChart";
7
8
  export { default as ChartTooltip } from "./common/ChartTooltip";
8
9
  export { default as ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame";
9
10
  export { default as ChartTooltipRow } from "./common/ChartTooltip/ChartTooltipRow";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "5.5.1",
3
+ "version": "5.7.0",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -26,17 +26,17 @@
26
26
  "es"
27
27
  ],
28
28
  "dependencies": {
29
- "ahooks": "^3.9.7",
29
+ "ahooks": "^3.10.0",
30
30
  "antd-style": "^4.1.0",
31
31
  "chroma-js": "^3.2.0",
32
32
  "date-fns": "^4.4.0",
33
- "dayjs": "^1.11.21",
33
+ "dayjs": "^1.11.23",
34
34
  "fast-deep-equal": "^3.1.3",
35
35
  "lucide-react": "^0.562.0",
36
36
  "recharts": "^2.15.4"
37
37
  },
38
38
  "peerDependencies": {
39
- "@lobehub/ui": "^4.3.3",
39
+ "@lobehub/ui": "^5.54.0",
40
40
  "antd": "^6.1.1",
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0"