@lobehub/charts 5.6.0 → 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.
- package/es/AccuracyBarChart/index.js +3 -3
- package/es/AreaChart/index.js +3 -3
- package/es/BarChart/index.js +3 -3
- package/es/BarList/index.js +3 -3
- package/es/BenchmarkColumnChart/index.js +3 -3
- package/es/BenchmarkRankingChart/index.js +11 -4
- package/es/BenchmarkScatterChart/index.js +11 -4
- package/es/ComposedChart/index.js +3 -3
- package/es/DataBars/CategoryBar.js +2 -1
- package/es/DataBars/DeltaBar.js +2 -1
- package/es/DataBars/MarkerBar.js +2 -1
- package/es/DataBars/ProgressBar.js +2 -1
- package/es/DonutChart/index.js +3 -3
- package/es/FunnelChart/index.js +3 -3
- package/es/Heatmaps/Calendar.js +1 -1
- package/es/Heatmaps/index.js +2 -1
- package/es/Legend/LegendItem.js +2 -2
- package/es/Legend/ScrollButton.js +1 -1
- package/es/LineChart/index.js +3 -3
- package/es/RadarChart/index.js +3 -3
- package/es/ScatterChart/ScatterChartTooltip.js +2 -2
- package/es/ScatterChart/ScatterChartTooltipRow.js +3 -3
- package/es/ScatterChart/index.js +3 -3
- package/es/SparkChart/SparkAreaChart.js +3 -3
- package/es/SparkChart/SparkBarChart.js +3 -3
- package/es/SparkChart/SparkLineChart.js +3 -3
- package/es/Tracker/TrackerBlock.js +2 -1
- package/es/Tracker/index.js +2 -1
- package/es/common/ChartTooltip/ChartTooltipRow.js +3 -3
- package/es/common/ChartTooltip/index.js +2 -2
- package/es/common/NoData.js +5 -22
- package/package.json +2 -2
|
@@ -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
|
|
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 { Bar, CartesianGrid, ErrorBar, Label, LabelList, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
@@ -134,8 +135,7 @@ var AccuracyBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
134
135
|
valueFormatter: xAxisLabelFormatter
|
|
135
136
|
});
|
|
136
137
|
}, [yAxisWidth, layout, data, xAxisLabelFormatter, index]);
|
|
137
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
138
|
-
active: true,
|
|
138
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
139
139
|
height: height,
|
|
140
140
|
width: width
|
|
141
141
|
});
|
package/es/AreaChart/index.js
CHANGED
|
@@ -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
|
|
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 { Area, CartesianGrid, Dot, Label, Legend, Line, AreaChart as ReChartsAreaChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
@@ -121,8 +122,7 @@ var AreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
121
122
|
valueFormatter: valueFormatter
|
|
122
123
|
});
|
|
123
124
|
}, [yAxisWidth, data, valueFormatter, index]);
|
|
124
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
125
|
-
active: true,
|
|
125
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
126
126
|
height: height,
|
|
127
127
|
width: width
|
|
128
128
|
});
|
package/es/BarChart/index.js
CHANGED
|
@@ -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
|
|
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 { Bar, CartesianGrid, Label, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
@@ -118,8 +119,7 @@ var BarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
118
119
|
valueFormatter: valueFormatter
|
|
119
120
|
});
|
|
120
121
|
}, [yAxisWidth, layout, data, valueFormatter, index]);
|
|
121
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
122
|
-
active: true,
|
|
122
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
123
123
|
height: height,
|
|
124
124
|
width: width
|
|
125
125
|
});
|
package/es/BarList/index.js
CHANGED
|
@@ -15,7 +15,8 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
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; }
|
|
17
17
|
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; }
|
|
18
|
-
import { A, Flexbox
|
|
18
|
+
import { A, Flexbox } from '@lobehub/ui';
|
|
19
|
+
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
19
20
|
import { cssVar, cx } from 'antd-style';
|
|
20
21
|
import React, { forwardRef, useMemo } from 'react';
|
|
21
22
|
import NoData from "../common/NoData";
|
|
@@ -62,8 +63,7 @@ var BarList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
62
63
|
return item.value === 0 ? 0 : Math.max(item.value / maxValue * 100, 2);
|
|
63
64
|
});
|
|
64
65
|
}, [sortedData]);
|
|
65
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
66
|
-
active: true,
|
|
66
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
67
67
|
height: height,
|
|
68
68
|
width: width
|
|
69
69
|
});
|
|
@@ -16,7 +16,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
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; }
|
|
18
18
|
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; }
|
|
19
|
-
import { Flexbox
|
|
19
|
+
import { Flexbox } from '@lobehub/ui';
|
|
20
|
+
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
20
21
|
import { cssVar, cx, useTheme } from 'antd-style';
|
|
21
22
|
import { readableColor } from 'polished';
|
|
22
23
|
import { forwardRef, useMemo, useState } from 'react';
|
|
@@ -276,8 +277,7 @@ var BenchmarkColumnChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
276
277
|
var showUnrankedAnnotation = firstUnrankedKey !== undefined && resolvedUnrankedLabel !== null;
|
|
277
278
|
var showChartHeader = enableLine && (showBarLegend || showLineLegend || showUnrankedAnnotation);
|
|
278
279
|
var chartTopPad = enableLine || enableError ? showChartHeader ? 84 : 44 : 12;
|
|
279
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
280
|
-
active: true,
|
|
280
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
281
281
|
height: height,
|
|
282
282
|
width: width
|
|
283
283
|
});
|
|
@@ -19,8 +19,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
19
19
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
20
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
|
-
import { A, Flexbox
|
|
23
|
-
import { Tooltip } from '
|
|
22
|
+
import { A, Flexbox } from '@lobehub/ui';
|
|
23
|
+
import { Skeleton, Tooltip } from '@lobehub/ui/base-ui';
|
|
24
24
|
import { cssVar, cx, useTheme } from 'antd-style';
|
|
25
25
|
import { forwardRef, useMemo, useState } from 'react';
|
|
26
26
|
import ChartTooltip from "../common/ChartTooltip";
|
|
@@ -141,8 +141,7 @@ var BenchmarkRankingChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
141
141
|
var gridTicks = axisTicks.filter(function (tick) {
|
|
142
142
|
return tick > 0 && tick < resolvedMaxValue;
|
|
143
143
|
});
|
|
144
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
145
|
-
active: true,
|
|
144
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
146
145
|
height: height !== null && height !== void 0 ? height : 280,
|
|
147
146
|
width: width
|
|
148
147
|
});
|
|
@@ -190,6 +189,14 @@ var BenchmarkRankingChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
190
189
|
padding: 0,
|
|
191
190
|
width: 'max-content'
|
|
192
191
|
},
|
|
192
|
+
content: {
|
|
193
|
+
color: cssVar.colorText,
|
|
194
|
+
fontSize: cssVar.fontSize,
|
|
195
|
+
lineHeight: cssVar.lineHeight,
|
|
196
|
+
maxWidth: 'none',
|
|
197
|
+
overflow: 'visible',
|
|
198
|
+
padding: 0
|
|
199
|
+
},
|
|
193
200
|
root: {
|
|
194
201
|
maxWidth: 'none'
|
|
195
202
|
}
|
|
@@ -20,9 +20,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
23
|
-
import { A
|
|
23
|
+
import { A } from '@lobehub/ui';
|
|
24
|
+
import { Segmented, Skeleton, Tooltip } from '@lobehub/ui/base-ui';
|
|
24
25
|
import { useSize } from 'ahooks';
|
|
25
|
-
import { Segmented, Tooltip } from 'antd';
|
|
26
26
|
import { cssVar, cx, useTheme } from 'antd-style';
|
|
27
27
|
import { forwardRef, useMemo, useRef, useState } from 'react';
|
|
28
28
|
import ChartTooltip from "../common/ChartTooltip";
|
|
@@ -408,8 +408,7 @@ var BenchmarkScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
408
408
|
yScale: yScaleObj
|
|
409
409
|
};
|
|
410
410
|
}, [activeMetric, frontier, frontierKeys, iconSize, labelSizes, markerSize, maxY, minY, plotHeight, plotWidth, points, showLabels, showXAxis, showYAxis, yAxisLabel, yFormatter, yValues]);
|
|
411
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
412
|
-
active: true,
|
|
411
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
413
412
|
height: plotHeight,
|
|
414
413
|
width: width
|
|
415
414
|
});
|
|
@@ -518,6 +517,14 @@ var BenchmarkScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
518
517
|
pointerEvents: 'none',
|
|
519
518
|
width: 'max-content'
|
|
520
519
|
},
|
|
520
|
+
content: {
|
|
521
|
+
color: cssVar.colorText,
|
|
522
|
+
fontSize: cssVar.fontSize,
|
|
523
|
+
lineHeight: cssVar.lineHeight,
|
|
524
|
+
maxWidth: 'none',
|
|
525
|
+
overflow: 'visible',
|
|
526
|
+
padding: 0
|
|
527
|
+
},
|
|
521
528
|
root: {
|
|
522
529
|
maxWidth: 'none',
|
|
523
530
|
pointerEvents: 'none'
|
|
@@ -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
|
|
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 { Bar, CartesianGrid, Label, Legend, Line, ComposedChart as ReChartsComposedChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
@@ -124,8 +125,7 @@ var ComposedChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
124
125
|
valueFormatter: rightFormatter
|
|
125
126
|
});
|
|
126
127
|
}, [yAxisRight, data, index]);
|
|
127
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
128
|
-
active: true,
|
|
128
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
129
129
|
height: height,
|
|
130
130
|
width: width
|
|
131
131
|
});
|
|
@@ -16,7 +16,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
17
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
-
import { Flexbox
|
|
19
|
+
import { Flexbox } from '@lobehub/ui';
|
|
20
|
+
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
20
21
|
import { cssVar, cx } from 'antd-style';
|
|
21
22
|
import { forwardRef, memo, useMemo } from 'react';
|
|
22
23
|
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
package/es/DataBars/DeltaBar.js
CHANGED
|
@@ -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
|
|
12
|
+
import { Flexbox } from '@lobehub/ui';
|
|
13
|
+
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
13
14
|
import { cssVar, cx } from 'antd-style';
|
|
14
15
|
import { forwardRef } from 'react';
|
|
15
16
|
import { DeltaTypes } from "../types/charts";
|
package/es/DataBars/MarkerBar.js
CHANGED
|
@@ -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
|
|
12
|
+
import { Flexbox } from '@lobehub/ui';
|
|
13
|
+
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
13
14
|
import { cssVar, cx } from 'antd-style';
|
|
14
15
|
import { forwardRef } from 'react';
|
|
15
16
|
import { styles } from "./styles";
|
|
@@ -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
|
|
12
|
+
import { Flexbox } from '@lobehub/ui';
|
|
13
|
+
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
13
14
|
import { cssVar, cx } from 'antd-style';
|
|
14
15
|
import { forwardRef } from 'react';
|
|
15
16
|
import { styles } from "./styles";
|
package/es/DonutChart/index.js
CHANGED
|
@@ -18,7 +18,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
18
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
|
-
import { Flexbox
|
|
21
|
+
import { Flexbox } from '@lobehub/ui';
|
|
22
|
+
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
22
23
|
import { css, cssVar, cx, useThemeMode } from 'antd-style';
|
|
23
24
|
import { forwardRef, useEffect, useState } from 'react';
|
|
24
25
|
import { Pie, PieChart as ReChartsDonutChart, ResponsiveContainer, Tooltip } from 'recharts';
|
|
@@ -96,8 +97,7 @@ var DonutChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}, [activeIndex]);
|
|
99
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
100
|
-
active: true,
|
|
100
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
101
101
|
height: height,
|
|
102
102
|
width: width
|
|
103
103
|
});
|
package/es/FunnelChart/index.js
CHANGED
|
@@ -22,7 +22,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
22
22
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
23
23
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
24
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
|
-
import { Flexbox
|
|
25
|
+
import { Flexbox } from '@lobehub/ui';
|
|
26
|
+
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
26
27
|
import { useSize } from 'ahooks';
|
|
27
28
|
import { css, cssVar, cx } from 'antd-style';
|
|
28
29
|
import { Fragment, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -253,8 +254,7 @@ var FunnelChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
253
254
|
y: closestBar.startY
|
|
254
255
|
});
|
|
255
256
|
};
|
|
256
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
257
|
-
active: true,
|
|
257
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
258
258
|
height: height,
|
|
259
259
|
width: width
|
|
260
260
|
});
|
package/es/Heatmaps/Calendar.js
CHANGED
|
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
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); }
|
|
8
8
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
9
|
-
import { Tooltip } from '@lobehub/ui';
|
|
9
|
+
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
10
10
|
import { keyframes } from 'antd-style';
|
|
11
11
|
import isEqual from 'fast-deep-equal';
|
|
12
12
|
import { memo, useMemo } from 'react';
|
package/es/Heatmaps/index.js
CHANGED
|
@@ -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
|
|
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';
|
package/es/Legend/LegendItem.js
CHANGED
|
@@ -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 {
|
|
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(
|
|
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 '
|
|
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) {
|
package/es/LineChart/index.js
CHANGED
|
@@ -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
|
|
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
|
|
121
|
-
active: true,
|
|
121
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
122
122
|
height: height,
|
|
123
123
|
width: width
|
|
124
124
|
});
|
package/es/RadarChart/index.js
CHANGED
|
@@ -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
|
|
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
|
|
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 {
|
|
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(
|
|
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 {
|
|
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(
|
|
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(
|
|
31
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
32
32
|
className: styles.number,
|
|
33
33
|
style: {
|
|
34
34
|
margin: 0
|
package/es/ScatterChart/index.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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";
|
package/es/Tracker/index.js
CHANGED
|
@@ -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
|
|
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 {
|
|
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(
|
|
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(
|
|
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 {
|
|
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(
|
|
35
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
36
36
|
ellipsis: true,
|
|
37
37
|
style: {
|
|
38
38
|
margin: 0
|
package/es/common/NoData.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Center,
|
|
2
|
-
import {
|
|
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 :
|
|
21
|
-
|
|
22
|
-
|
|
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
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/charts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "React modern charts components built on recharts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"recharts": "^2.15.4"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@lobehub/ui": "^
|
|
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"
|