antvis / antvis/F2

柱状图出现滚动条不显示后面的数据?

Open
#768 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

> 出现滚动条后、只能显示values的前几位,请问一下 怎么设置出现滚动条,并且全部显所有的数据??!

![image](https://user-images.githubusercontent.com/14069048/72698741-700d6480-3b80-11ea-8d02-fcf5cdff0ab6.png)

**data 是元数据**
![image](https://user-images.githubusercontent.com/14069048/72698636-f6757680-3b7f-11ea-8f37-3c6e89298151.png)
**config 是显示的索引**
`
config = {
difficulty: {
tickCount: 5,
values
}
};
`

**values**
` ["Single Choice", "Multiple Choice", "Multiple Choices"] `

**配置柱状图**
`chart.source(data, config);`

**配置滚动条**
`
chart.scrollBar({
mode: 'x',
xStyle: {
backgroundColor: '#e8e8e8',
fillerColor: '#FFAA0A',
size: 2,
offsetY:0 // 0: 无legend的情况, -40 有
}
});
chart.interaction('pan');
`

[问题详情请看](https://segmentfault.com/q/1010000021628139)

Contributor guide

Open the contributing guide

Research direction

Start with the chart.scrollBar({ mode: 'x' }) and chart.interaction('pan') configuration shown in the issue, then reproduce the bar chart using the supplied data, config, and values. Done means the horizontal scrollbar and pan interaction allow all category values to be displayed rather than only the first few.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
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.