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

ECharts3的toolbox.feature.magicType.option设置没有起作用 (急需解决) #2906

Closed
Haichengguo opened this issue Mar 25, 2016 · 2 comments

Comments

@Haichengguo
Copy link

问题简述 (One-line summary)

  1. ECharts3的toolbox.feature.magicType.option设置没有起作用
  2. 我想在堆积的时候使用配置的 areaStyle ,而普通折线图时不需要,但配置发现 option 不起作用

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): Echarts 3
  • 浏览器类型和版本 (Browser version):
  • 操作系统类型和版本 (OS Version): MAC OS

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

切换图表时,可以使用不同的配置

可能哪里有问题 (What went wrong)

  1. 希望关于这块配置的文档能够详细一点

ECharts配置项 (ECharts option)

option = {
    title: {
        text: '堆叠区域图'
    },
    tooltip : {
        trigger: 'axis'
    },
    legend: {
        data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
    },
    toolbox: {
        feature: {
            saveAsImage: {},
            magicType: {
                type: ['line', 'bar', 'stack'],
                option: {
                    'stack': {
                        series: {
                            areaStyle: {
                                normal: {} 
                            }
                        }
                    }
                }
            },
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['周一','周二','周三','周四','周五','周六','周日']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'邮件营销',
            type:'line',
            data:[120, 132, 101, 134, 90, 230, 210]
        },
        {
            name:'联盟广告',
            type:'line',
            data:[220, 182, 191, 234, 290, 330, 310]
        },
        {
            name:'视频广告',
            type:'line',
            data:[150, 232, 201, 154, 190, 330, 410]
        },
        {
            name:'直接访问',
            type:'line',
            data:[320, 332, 301, 334, 390, 330, 320]
        },
        {
            name:'搜索引擎',
            type:'line',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            data:[820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]
};

其他信息 (Other comments)

@pissang
Copy link
Contributor

pissang commented Mar 25, 2016

#2855

@pissang pissang closed this as completed Mar 25, 2016
@Fuerniu
Copy link

Fuerniu commented Feb 26, 2020

stack不需要加分号

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

3 participants