@publishfx/publish-chart 2.1.35 → 2.1.38

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/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ **2.1.38** feat(chart): 分组对比折线图自定义图例逻辑优化 f-6719092744
2
+ - 2026-06-16T14:36:13+08:00 [feat(chart): 分组对比折线图自定义图例逻辑优化 f-6719092744](http://lf.git.oa.mt/publish_platform/web/publish/commit/a03eaf696cb567384e0e888cb2cd1a86046ecae3)
3
+ - 2026-06-09T11:58:41+08:00 [feat(chart): 撤销组合图tooltip优化 f-6854368983](http://lf.git.oa.mt/publish_platform/web/publish/commit/1b7e955aa4ff680ce2bad27c3709306d3f12c7d3)
4
+ - 2026-06-09T11:17:39+08:00 [feat(chart): 组合图tooltip优化 m-6854368983](http://lf.git.oa.mt/publish_platform/web/publish/commit/9494d57a415c8b86ab79a1ed2e671b1390c514a6)
5
+
6
+ **2.1.36** feat(chart): 组合图tooltip优化 m-6854368983
7
+ - 2026-06-09T11:17:39+08:00 [feat(chart): 组合图tooltip优化 m-6854368983](http://lf.git.oa.mt/publish_platform/web/publish/commit/9494d57a415c8b86ab79a1ed2e671b1390c514a6)
8
+
9
+ **2.1.35** fix(chart): 组合图需要highlightDate依赖侦听
10
+ - 2026-03-19T19:24:40+08:00 [fix(chart): 组合图需要highlightDate依赖侦听](http://lf.git.oa.mt/publish_platform/web/publish/commit/5bd7170d6dd7707c06a7a14f944a8317642ccf2f)
11
+
1
12
  **2.1.35** fix(chart): 组合图需要highlightDate依赖侦听
2
13
  - 2026-03-19T19:24:40+08:00 [fix(chart): 组合图需要highlightDate依赖侦听](http://lf.git.oa.mt/publish_platform/web/publish/commit/5bd7170d6dd7707c06a7a14f944a8317642ccf2f)
3
14
 
@@ -446,13 +446,17 @@ const GroupLineCompare = ({ height, data, x = 'groupName', y = '', legend = 'gro
446
446
  filter: (name)=>checkedLegendItems.has(name),
447
447
  onChange: (e)=>{
448
448
  const { unchecked, name } = e.item;
449
- if (unchecked) {
450
- checkedLegendItems.delete(name);
451
- checkedLegendItems.delete(`${name}_compare`);
452
- } else checkedLegendItems.add(name).add(`${name}_compare`);
453
- setCheckedLegendItems(new Set([
454
- ...checkedLegendItems
455
- ]));
449
+ setCheckedLegendItems((prev)=>{
450
+ const next = new Set(prev);
451
+ if (unchecked) {
452
+ next.delete(name);
453
+ next.delete(`${name}_compare`);
454
+ } else {
455
+ next.add(name);
456
+ next.add(`${name}_compare`);
457
+ }
458
+ return next;
459
+ });
456
460
  },
457
461
  maxItemWidth: 1,
458
462
  visible: isLegend,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@publishfx/publish-chart",
3
- "version": "2.1.35",
3
+ "version": "2.1.38",
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": [
@@ -24,10 +24,20 @@
24
24
  "CHANGELOG.md",
25
25
  "README.md"
26
26
  ],
27
+ "scripts": {
28
+ "build": "rslib build",
29
+ "dev": "rslib build --watch",
30
+ "lint": "eslint src --ext .ts,.tsx",
31
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
32
+ "test": "jest",
33
+ "test:watch": "jest --watch",
34
+ "test:coverage": "jest --coverage"
35
+ },
27
36
  "devDependencies": {
28
37
  "@antv/data-set": "^0.11.8",
29
38
  "@antv/g-pattern": "^2.0.42",
30
39
  "@antv/g2": "^5.3.0",
40
+ "@publishfx/publish-components": "workspace:^",
31
41
  "@types/jest": "^29.5.12",
32
42
  "@types/lodash": "^4.17.20",
33
43
  "@types/react": "^18.3.18",
@@ -45,8 +55,7 @@
45
55
  "react-dom": "^18.3.1",
46
56
  "styled-components": "^5.3.11",
47
57
  "ts-jest": "^29.1.2",
48
- "typescript": "^5.9.3",
49
- "@publishfx/publish-components": "^2.1.0"
58
+ "typescript": "^5.9.3"
50
59
  },
51
60
  "peerDependencies": {
52
61
  "@antv/data-set": "^0.11.8",
@@ -62,14 +71,5 @@
62
71
  "publishConfig": {
63
72
  "access": "public",
64
73
  "registry": "https://registry.npmjs.org/"
65
- },
66
- "scripts": {
67
- "build": "rslib build",
68
- "dev": "rslib build --watch",
69
- "lint": "eslint src --ext .ts,.tsx",
70
- "lint:fix": "eslint src --ext .ts,.tsx --fix",
71
- "test": "jest",
72
- "test:watch": "jest --watch",
73
- "test:coverage": "jest --coverage"
74
74
  }
75
- }
75
+ }