antvis / antvis/G2Plot

🤔 [QUESTION] 双轴图-柱线混合图表 数据点绘制时趋势错误

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

Description

### 折线图与 柱状图 x轴的type数据不对应时,折线图绘制趋势混乱,是否有属性可以解决这个问题呢?还是需要用户传递数据的时候,x轴的type数据必须要一一对应呢?

### 图表链接:https://antv-g2plot.gitee.io/zh/examples/dual-axes/column-line#column-multi-line
代码部分只修改了transformData
const transformData = [
{ time: '2019-06', count: 380, name: 'a' },
{ time: '2019-04', count: 600, name: 'a' },
{ time: '2019-05', count: 400, name: 'a' },
{ time: '2019-07', count: 220, name: 'a' },
{ time: '2019-03', count: 800, name: 'a' },
// { time: '2019-03', count: 750, name: 'b' },
// { time: '2019-04', count: 650, name: 'b' },
// { time: '2019-05', count: 450, name: 'b' },
// { time: '2019-06', count: 400, name: 'b' },
// { time: '2019-07', count: 320, name: 'b' },
// { time: '2019-03', count: 900, name: 'c' },
// { time: '2019-04', count: 600, name: 'c' },
// { time: '2019-05', count: 450, name: 'c' },
// { time: '2019-06', count: 300, name: 'c' },
// { time: '2019-07', count: 200, name: 'c' },
];

### 🚑 Any additional [like screenshots]
220 是最高的 800 反而是最低的
截屏2022-02-04 下午7 58 34
截屏2022-02-04 下午7 59 20

Contributor guide

Open the contributing guide

Research direction

Begin at the linked dual-axes column-line example and reproduce the result with the shown transformData order. Trace how the chart handles x-axis values across the column and line series; done means the expected chronological trend is verified and the required behavior or input expectation is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.