3.7.7版本的分组柱形图不支持图表平移
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
- [ ] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.
### Reproduction link
[http://antv-2018.alipay.com/zh-cn/f2/3.x/demo/bar/dodge-column.html](http://antv-2018.alipay.com/zh-cn/f2/3.x/demo/bar/dodge-column.html)
### Steps to reproduce
F2 图表组件库 - AntV
/* Fixing iframe window.innerHeight 0 issue in Safari */document.body.clientHeight
var data = [{
name: 'London',
月份: 'Jan.',
月均降雨量: 18.9
}, {
name: 'London',
月份: 'Feb.',
月均降雨量: 28.8
}, {
name: 'London',
月份: 'Mar.',
月均降雨量: 39.3
}, {
name: 'London',
月份: 'Apr.',
月均降雨量: 81.4
}, {
name: 'London',
月份: 'May.',
月均降雨量: 47
}, {
name: 'London',
月份: 'Jun.',
月均降雨量: 20.3
}, {
name: 'London',
月份: 'Jul.',
月均降雨量: 24
}, {
name: 'London',
月份: 'Aug.',
月均降雨量: 35.6
}, {
name: 'Berlin',
月份: 'Jan.',
月均降雨量: 12.4
}, {
name: 'Berlin',
月份: 'Feb.',
月均降雨量: 23.2
}, {
name: 'Berlin',
月份: 'Mar.',
月均降雨量: 34.5
}, {
name: 'Berlin',
月份: 'Apr.',
月均降雨量: 99.7
}, {
name: 'Berlin',
月份: 'May.',
月均降雨量: 52.6
}, {
name: 'Berlin',
月份: 'Jun.',
月均降雨量: 35.5
}, {
name: 'Berlin',
月份: 'Jul.',
月均降雨量: 37.4
}, {
name: 'Berlin',
月份: 'Aug.',
月均降雨量: 42.4
}]
var chart = new F2.Chart({
id: 'mountNode',
pixelRatio: window.devicePixelRatio
})
var originDates = []
data.forEach(function(obj, index) {
if (index <= 5) {
originDates.push(obj['月份'])
}
})
chart.source(data, {
'月份': {
type: 'cat',
tickCount: 7,
values: originDates
}
})
chart.interval().position('月份*月均降雨量').color('name').adjust({
type: 'dodge',
marginRatio: 0.05 // 设置分组间柱子的间距
})
// 定义进度条
chart.scrollBar({
mode: 'x',
xStyle: {
backgroundColor: '#e8e8e8',
fillerColor: '#808080',
offsetY: -2
}
})
chart.interaction('pan')
chart.render()
| Environment | Info |
|---|---|
| f2 | 3.7.7 |
| System | - |
| Browser | - |
---
上面是修改的demo上的代码,demo的原版本改为3.4.2
将demo中的sdk更新为最新版本后,分组柱形图不支持图表平移了,折线图目前可以
Contributor guide
Research direction
Start with the linked grouped-column demo and compare the embedded F2 3.7.7 script with the original 3.4.2 version. Reproduce horizontal panning with the dodge-adjusted bars and compare it with the line-chart behavior; the issue is done when grouped bars pan again without breaking the scrollbar or other chart interactions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100