-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
ECharts3的toolbox.feature.magicType.option设置没有起作用 #2855
Comments
可能 toolbox.feature.magicType 没作用的不仅是 option,前些天忙了,没提交这个问题,而且baidu上关于这个的文档和实例比较缺乏,不太确定是否是我写错了。 我期望的是 tiled 和 stack 按钮仅对 series 的 0、1 两个起作用,而不影响 2 (即'搜索引擎')。但实际是这个配置没有效果,3个series都被平铺、堆叠,且填充透明度没有改变。 相关的配置如下(option部分问题和楼主类似的,此外seriesIndex部分也没有作用,抱歉,代码部分好像没法编辑成美观些的样子): var option = {
title: {
text: '堆叠区域图'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['邮件营销','联盟广告','搜索引擎']
},
toolbox: {
feature: {
saveAsImage: {},
restore : {show: true},
magicType: {
show: true,
type: ['tiled','stack'],
seriesIndex: {
tiled: [0,1],
stack: [0,1]
},
option: {
tiled: {areaStyle: {normal: {opacity:0}}},
stack: {areaStyle: {normal: {opacity:0.3}}}
}
}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'category',
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
yAxis : [
{
type : 'value'
},
{
type : 'value'
}
],
series : [
{
name:'邮件营销',
type:'line',
stack: '总量',
areaStyle: {normal: {opacity:0.3}},
data:[120, 132, 101, 134, 90, 230, 210]
},
{
name:'联盟广告',
type:'line',
stack: '总量',
areaStyle: {normal: {opacity:0.3}},
data:[220, 182, 191, 234, 290, 330, 310]
},
{
name:'搜索引擎',
type:'line',
stack: '总量2',
yAxisIndex:1,
label: {
normal: {
show: true,
position: 'top'
}
},
lineStyle: {normal:{shadowColor:'#666',shadowBlur: 3}},
data:[820, 932, 901, 934, 600, 1330, 1320]
}
]
}; |
谢谢反馈 |
今天刚好也要用到 toolbox.feature.magicType.option , 我是想在切换到堆叠的时候,设置下:areaStyle , 结果没有效果。 |
这个是好了吗,官网下的echarts.min.js 可以用了吗?能给个具体的例子不 |
@netwww1 发的例子就可以 |
echart 如何修改 toolbox, magicType的按钮选中颜色和选中状态, 例如mark属性 |
3.4.0版本貌似也是这样,还没修复吗? |
echart中toolbox的magicType属性option里面设置的样式是复写series中的样式内容,只有在series中能改变的属性才能被修改,如果不是则修改不了。 |
问题简述 (One-line summary)
ECharts3的toolbox.feature.magicType.option好像不起作用,不知道是不是我的写法有问题?
我想在 line 图的设置 xAxis: {boundaryGap: true},
bar图的时候设置 xAxis: {boundaryGap: false}
版本及环境 (Version & Environment)
ECharts 3
Chrome49
Windows7
重现步骤 (Steps to reproduce)
1.浏览器生成line图
2.点击图右上方转换为bar图
期望结果 (Expected behaviour)
不同图时boundaryGap的设置可以生效
可能哪里有问题 (What went wrong)
可能示例不详细导致我设置方式有问题,也可能ECharts3版本新出还没有人用这个功能。
谢谢!
ECharts配置项 (ECharts option)
其他信息 (Other comments)
The text was updated successfully, but these errors were encountered: