g2plot 柱状图的 缩略轴-趋势线 有时显示有时隐藏
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
1. 堆叠分组模式 & 数据中 colorField 字段是字符串的时候是显示的

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

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

4. 复现:https://codesandbox.io/s/lucid-mayer-j27wiy?file=/index.ts
5. 数据:[
{
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: "鼠标"
}
]
* **G2Plot Version**: 2.4.20
* **Platform**: g2plot
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction at index.ts and compare the stacked-grouped, stacked, string colorField, and numeric colorField cases shown in the report. Confirm the behavior on G2Plot 2.4.20; done means the thumbnail-axis trend line renders consistently for the affected configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100