双轴图添加slider功能后数据未对齐的问题
Open
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
### Discussed in https://github.com/antvis/G2Plot/discussions/3609
Originally posted by **jasonzysun** June 27, 2023
使用版本:v2.4.25
添加Slider前:
```
dualAxes = new DualAxes('buyDIMView-container', {
data: [data, data],
xField: 'date',
yField: ['payAmount', 'tokenAmount'],
label: {
// 可手动配置 label 数据标签位置
position: 'middle', // 'top', 'bottom', 'middle',
// 配置样式
style: {
fill: '#FFFFFF',
opacity: 0.6
}
},
geometryOptions: [
{
geometry: 'column'
},
{
geometry: 'line',
lineStyle: {
lineWidth: 2
}
}
]
})
```
添加Slider后:
```
dualAxes = new DualAxes('buyDIMView-container', {
data: [data, data],
xField: 'date',
yField: ['payAmount', 'tokenAmount'],
label: {
// 可手动配置 label 数据标签位置
position: 'middle', // 'top', 'bottom', 'middle',
// 配置样式
style: {
fill: '#FFFFFF',
opacity: 0.6
}
},
geometryOptions: [
{
geometry: 'column'
},
{
geometry: 'line',
lineStyle: {
lineWidth: 2
}
}
],
slider: {
start: 0.0,
end: 1.0
}
})
```
同时,刷新页面时有概率出现缩略图宽体未填充完整的情况,此时的双轴图数据是对齐的。
Contributor guide
Research direction
Reproduce the DualAxes example with identical data arrays and the shown slider configuration, comparing the aligned chart with the misaligned result and the incomplete thumbnail case. No file, test, or code entry point is named in the issue; done means identifying the slider-related alignment problem and preserving matching dual-axis data and a fully rendered thumbnail.
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
- 35/100