antvis / G2Plot

:dango: An interactive and responsive charting library based on G2.
https://g2plot.antv.antgroup.com
MIT License
2.56k stars 607 forks source link

g2plot 柱状图的 缩略轴-趋势线 有时显示有时隐藏 #3432

Open rabbit-tian opened 1 year ago

rabbit-tian commented 1 year ago
  1. 堆叠分组模式 & 数据中 colorField 字段是字符串的时候是显示的

image

  1. 只在 堆叠 & 数据中 colorField 字段是字符串的时候是 隐藏的

image

  1. 数据中 colorField 字段是数值型的时候是 隐藏的

image

  1. 复现:https://codesandbox.io/s/lucid-mayer-j27wiy?file=/index.ts

  2. 数据:[ { x: "办公用品", trace: "男", y: 8, colorField: "橡皮擦" }, { x: "办公用品", trace: "男", y: 10, colorField: "书架" }, { x: "办公用品", trace: "男", y: 20, colorField: "砚台" }, { x: "办公用品", trace: "女", y: 13, colorField: "砚台" }, { x: "办公用品", trace: "女", y: 21, colorField: "橡皮擦" }, { x: "办公用品", trace: "女", y: 21, colorField: "书架" }, { x: "家电家具", trace: "男", y: 13, colorField: "洗衣机" }, { x: "家电家具", trace: "女", y: 2, colorField: "洗衣机" }, { x: "家电家具", trace: "男", y: 5, colorField: "微波炉" }, { x: "家电家具", trace: "男", y: 14, colorField: "电磁炉" }, { x: "家电家具", trace: "女", y: 23, colorField: "微波炉" }, { x: "家电家具", trace: "女", y: 23, colorField: "电磁炉" }, { x: "电子产品", trace: "男", y: 33, colorField: "电脑" }, { x: "电子产品", trace: "女", y: 4, colorField: "电脑" }, { x: "电子产品", trace: "女", y: 23, colorField: "switch" }, { x: "电子产品", trace: "男", y: 20.9, colorField: "switch" }, { x: "电子产品", trace: "男", y: 5.9, colorField: "鼠标" }, { x: "电子产品", trace: "女", y: 5.9, colorField: "鼠标" } ]

rabbit-tian commented 1 year ago

@visiky 求优化