@publishfx/publish-chart 2.1.36 → 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,8 @@
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
+
1
6
  **2.1.36** feat(chart): 组合图tooltip优化 m-6854368983
2
7
  - 2026-06-09T11:17:39+08:00 [feat(chart): 组合图tooltip优化 m-6854368983](http://lf.git.oa.mt/publish_platform/web/publish/commit/9494d57a415c8b86ab79a1ed2e671b1390c514a6)
3
8
 
@@ -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,
@@ -259,7 +259,6 @@ function renderG2CombineChart(container, options) {
259
259
  shared: true,
260
260
  crosshairsY: true,
261
261
  marker: false,
262
- mount: 'body',
263
262
  render: (_event, payload)=>{
264
263
  const { title, items } = payload;
265
264
  let safeTitle = title.replace(/,.*$/, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@publishfx/publish-chart",
3
- "version": "2.1.36",
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": [