@lobehub/charts 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/es/AccuracyBarChart/index.js +11 -17
  2. package/es/AccuracyBarChart/styles.d.ts +11 -11
  3. package/es/AccuracyBarChart/styles.js +8 -8
  4. package/es/AreaChart/index.js +9 -13
  5. package/es/AreaChart/styles.d.ts +6 -6
  6. package/es/AreaChart/styles.js +6 -6
  7. package/es/BarChart/index.js +9 -13
  8. package/es/BarChart/styles.d.ts +6 -6
  9. package/es/BarChart/styles.js +6 -6
  10. package/es/BarList/index.js +3 -5
  11. package/es/BarList/styles.d.ts +10 -10
  12. package/es/BarList/styles.js +10 -10
  13. package/es/DataBars/CategoryBar.js +4 -10
  14. package/es/DataBars/DeltaBar.js +5 -8
  15. package/es/DataBars/MarkerBar.js +5 -8
  16. package/es/DataBars/ProgressBar.js +4 -7
  17. package/es/DataBars/styles.d.ts +7 -7
  18. package/es/DataBars/styles.js +6 -6
  19. package/es/DonutChart/index.js +7 -11
  20. package/es/DonutChart/styles.d.ts +6 -6
  21. package/es/DonutChart/styles.js +6 -6
  22. package/es/FunnelChart/index.js +8 -12
  23. package/es/FunnelChart/styles.d.ts +6 -6
  24. package/es/FunnelChart/styles.js +6 -6
  25. package/es/Heatmaps/Calendar.js +133 -50
  26. package/es/Heatmaps/ChartLabels.js +95 -42
  27. package/es/Heatmaps/Footer.js +95 -50
  28. package/es/Heatmaps/index.js +124 -84
  29. package/es/Heatmaps/styles.d.ts +7 -7
  30. package/es/Heatmaps/styles.js +4 -4
  31. package/es/Legend/LegendItem.js +6 -11
  32. package/es/Legend/index.js +2 -5
  33. package/es/LineChart/index.js +7 -11
  34. package/es/LineChart/styles.d.ts +6 -6
  35. package/es/LineChart/styles.js +6 -6
  36. package/es/ScatterChart/ScatterChartTooltip.js +5 -10
  37. package/es/ScatterChart/ScatterChartTooltipRow.js +4 -7
  38. package/es/ScatterChart/index.js +5 -9
  39. package/es/ScatterChart/styles.d.ts +6 -6
  40. package/es/ScatterChart/styles.js +6 -6
  41. package/es/SparkChart/SparkAreaChart.js +4 -8
  42. package/es/SparkChart/SparkBarChart.js +2 -6
  43. package/es/SparkChart/SparkLineChart.js +2 -6
  44. package/es/Tracker/TrackerBlock.js +7 -11
  45. package/es/Tracker/index.js +2 -4
  46. package/es/Tracker/styles.d.ts +5 -5
  47. package/es/Tracker/styles.js +5 -5
  48. package/es/common/ChartTooltip/ChartTooltipFrame.d.ts +3 -3
  49. package/es/common/ChartTooltip/ChartTooltipFrame.js +4 -6
  50. package/es/common/ChartTooltip/ChartTooltipRow.js +4 -6
  51. package/es/common/ChartTooltip/index.js +5 -9
  52. package/es/common/CustomYAxisTick.js +2 -3
  53. package/es/common/NoData.js +3 -4
  54. package/package.json +4 -3
@@ -1,4 +1,4 @@
1
- import { useTheme } from 'antd-style';
1
+ import { cssVar } from 'antd-style';
2
2
  import React, { memo } from 'react';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  var CustomYAxisTick = /*#__PURE__*/memo(function (_ref) {
@@ -8,13 +8,12 @@ var CustomYAxisTick = /*#__PURE__*/memo(function (_ref) {
8
8
  payload = _ref.payload,
9
9
  align = _ref.align,
10
10
  formatter = _ref.formatter;
11
- var theme = useTheme();
12
11
  var yAxisLabelWidth = yAxisLabel ? 24 : 0;
13
12
  return /*#__PURE__*/_jsx("g", {
14
13
  transform: "translate(".concat(align === 'left' ? yAxisLabelWidth : x + yAxisLabelWidth, ",").concat(y, ")"),
15
14
  children: /*#__PURE__*/_jsx("text", {
16
15
  dy: 4,
17
- fill: theme.colorTextDescription,
16
+ fill: cssVar.colorTextDescription,
18
17
  fontSize: 12,
19
18
  textAnchor: align === 'left' ? 'start' : 'end',
20
19
  x: 0,
@@ -1,6 +1,6 @@
1
1
  import { Center, Flexbox } from '@lobehub/ui';
2
2
  import { Empty } from 'antd';
3
- import { useTheme } from 'antd-style';
3
+ import { cssVar } from 'antd-style';
4
4
  import { isValidElement, memo } from 'react';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -11,7 +11,6 @@ var NoData = /*#__PURE__*/memo(function (_ref) {
11
11
  title: 'No Data'
12
12
  } : _ref$noDataText,
13
13
  className = _ref.className;
14
- var theme = useTheme();
15
14
  var isReactNodeText = /*#__PURE__*/isValidElement(noDataText);
16
15
  return /*#__PURE__*/_jsx(Center, {
17
16
  height: '100%',
@@ -22,14 +21,14 @@ var NoData = /*#__PURE__*/memo(function (_ref) {
22
21
  padding: 8,
23
22
  children: [/*#__PURE__*/_jsx("div", {
24
23
  style: {
25
- color: theme.colorText,
24
+ color: cssVar.colorText,
26
25
  fontSize: 14,
27
26
  fontWeight: 'bold'
28
27
  },
29
28
  children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.title
30
29
  }), /*#__PURE__*/_jsx("div", {
31
30
  style: {
32
- color: theme.colorTextDescription,
31
+ color: cssVar.colorTextDescription,
33
32
  fontSize: 12
34
33
  },
35
34
  children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.desc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -27,16 +27,17 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "ahooks": "^3.9.6",
30
- "antd-style": "^4.0.0",
30
+ "antd-style": "^4.1.0",
31
31
  "chroma-js": "^3.2.0",
32
32
  "date-fns": "^4.1.0",
33
33
  "dayjs": "^1.11.19",
34
+ "fast-deep-equal": "^3.1.3",
34
35
  "lucide-react": "^0.562.0",
35
36
  "polished": "^4.3.1",
36
37
  "recharts": "^2.15.4"
37
38
  },
38
39
  "peerDependencies": {
39
- "@lobehub/ui": "^4.0.0",
40
+ "@lobehub/ui": "^4.3.3",
40
41
  "antd": "^6.1.1",
41
42
  "react": "^19.0.0",
42
43
  "react-dom": "^19.0.0"