echarts常用图表类型及属性汇总——柱状波浪图

{
                title: {
                    text: (chartData && chartData.echartName) || '无标题',
                    subtext: (chartData && chartData.subtext) || '',
                    subtextStyle: {
                        align:'right',
                        color:'#aaa',
                        fontSize: 12,
                        fontWeight: 'normal'
                    }
                }, 
                tooltip: {},
                grid: {
                    left: '3%',
                    right: '45px',
                    top:'90px',
                    bottom: '3%',
                    containLabel: true
                }, 
                xAxis: (chartData && chartData.xAxis) || {
                    name:that.xname || '',
                    show:this.nox?false:true,
                    splitLine: {show: false},
                    // axisTick: {
                    //     show: false //去掉刻度线
                    // },
                    axisLine: { 
                        // 设置轴线的属性
                        lineStyle: {
                            color: '#8e8e8e', //
                            width: 1 // 这里是为了突出显示加上的
                        }
                    },
                    data: chartData && chartData.datas && chartData.datas.x, // ['04/16', '04/21', '04/26', '05/01', '05/06', '05/11', '05/16'],
                }, 
                yAxis: {
                    name: that.yname || '',
                    axisLine: {
                        // 设置轴线的属性
                        lineStyle: {
                            color: '#8e8e8e',
                            width: 1 // 这里是为了突出显示加上的
                        },
                        formatter: '{value} %'
                    }, 
                    splitLine: {
                        // 设置网格样式
                        show: false,
                    }
                },
                series: (chartData && chartData.series) || [
                    // 用于指定图标显示类型
                    {
                        // name: chartData && chartData.echartXName,
                        type: 'bar',
 
                        data: chartData && chartData.datas && chartData.datas.y,
                        animationDelay: function (idx) {
                            return idx * 10;
                        },
                    }
                ], 
                animationEasing: 'elasticOut',
                animationDelayUpdate: function (idx) {
                    return idx * 5;
                }
            };
posted @ 2020-10-15 19:50  liuxu_xrl  阅读(1240)  评论(0编辑  收藏  举报