@publishfx/publish-chart 2.1.26 → 2.1.27

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.
@@ -21,7 +21,7 @@ const G2BarChart = ({ height = 300, data, x = "", y = "", indicatorMap, onChartC
21
21
  const themeColors = contextConfig?.theme?.colors || [];
22
22
  const safeIndicatorMap = indicatorMap || contextConfig.indicatorMap || {};
23
23
  const safeLegend = "groupType" !== legend ? legend || y : y;
24
- const isCompare = timeRange?.compareStartTime !== "";
24
+ const isCompare = timeRange?.compareStartTime !== "" && timeRange?.compareStartTime !== null;
25
25
  const safeY = "groupValue";
26
26
  const chartConfig = config || {};
27
27
  const { isDataTag = false, isDescend = false, isHorizontal = false, isLegend = true, isHighlight = true } = chartConfig;
@@ -72,7 +72,7 @@ const G2CombineChart = ({ height = 300, data, x = "", y = "", z = "", indicatorM
72
72
  const safeIndicatorMap = indicatorMap || contextConfig.indicatorMap || {};
73
73
  const safeZ = z;
74
74
  const safeY = "groupValue";
75
- const isCompare = timeRange?.compareStartTime !== "";
75
+ const isCompare = timeRange?.compareStartTime !== "" && timeRange?.compareStartTime !== null;
76
76
  const chartConfig = config || {};
77
77
  const { isDataTag = true, isCombineDataTag = true, isLegend = true, isDescend = false, isHighlight = true } = chartConfig;
78
78
  const [xyList, setXYList] = useState([]);
@@ -22,7 +22,7 @@ const G2LineChart = ({ height = 300, data, x = "", y = "", z = "", indicatorMap,
22
22
  const themeColors = contextConfig?.theme?.colors || [];
23
23
  const safeIndicatorMap = indicatorMap || contextConfig.indicatorMap || {};
24
24
  const safeLegend = "groupType" !== legend ? legend || y : y;
25
- const isCompare = timeRange?.compareStartTime !== "";
25
+ const isCompare = timeRange?.compareStartTime !== "" && timeRange?.compareStartTime !== null;
26
26
  const safeY = "groupValue";
27
27
  const chartConfig = config || {};
28
28
  const { isDataTag = false, isHighlight = true, isLegend = true } = chartConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@publishfx/publish-chart",
3
- "version": "2.1.26",
3
+ "version": "2.1.27",
4
4
  "description": "A React chart component library for the Publish platform, including BarChart, LineChart, BarLineChart and other visualization components",
5
5
  "type": "module",
6
6
  "keywords": [