Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bar使用barMaxWidth时,出现向右偏移的现象 #931

Closed
readyou opened this issue Nov 21, 2014 · 5 comments
Closed

bar使用barMaxWidth时,出现向右偏移的现象 #931

readyou opened this issue Nov 21, 2014 · 5 comments

Comments

@readyou
Copy link

readyou commented Nov 21, 2014

bar使用barMaxWidth时,出现向右偏移的现象,如下图所示:

image
image

@readyou
Copy link
Author

readyou commented Nov 21, 2014

切换到堆积图时,出现这种向右偏移现象。

@kener
Copy link
Contributor

kener commented Nov 21, 2014

xAxis boundary设置为true?
上官网适用的option

@readyou
Copy link
Author

readyou commented Nov 25, 2014

没明白。
将xAxis的boundaryGap设置为false,效果如下,向右偏移的现象还是存在。
image
image

@kener
Copy link
Contributor

kener commented Nov 25, 2014

上option

@readyou
Copy link
Author

readyou commented Nov 26, 2014

option = {
legend: {
data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
},
toolbox: {
show: true,
feature: {
magicType: {
show: true,
type: ['stack', 'tiled']
}
}
},
calculable: true,
yAxis: [{
type: 'value'
}],
xAxis: [{
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
}],
series: [{
name: '直接访问',
type: 'bar',
barMaxWidth: 30,
stack: '总量',
data: [320, 302, 301, 334, 390, 330, 320]
},
{
name: '邮件营销',
type: 'bar',
barMaxWidth: 30,
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'bar',
barMaxWidth: 30,
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'bar',
barMaxWidth: 30,
stack: '总量',
data: [150, 212, 201, 154, 190, 330, 410]
},
{
name: '搜索引擎',
type: 'bar',
barMaxWidth: 30,
stack: '总量',
data: [820, 832, 901, 934, 1290, 1330, 1320]
}]
};

@kener kener closed this as completed in 1042514 Dec 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants