antvis / antvis/G2Plot

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

Open
#3,432 1 comment 0 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

1. 堆叠分组模式 & 数据中 colorField 字段是字符串的时候是显示的

![image](https://user-images.githubusercontent.com/26690191/208040204-9d445dc1-8ade-4718-9b81-4994c1d229f7.png)

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

![image](https://user-images.githubusercontent.com/26690191/208040374-16e22e4a-843b-4c1e-b555-b6276040a3a9.png)

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

![image](https://user-images.githubusercontent.com/26690191/208040422-384c6f6c-b87a-49b7-b64d-e0197ec33b95.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.