ECharts堆叠区域图重叠显示

来源:互联网 发布:路由器mac地址会变吗 编辑:程序博客网 时间:2024/04/30 04:25
regionalMap();
function regionalMap(){
    var myChartFour = echarts.init(document.getElementById('regionalMap'));
        optionFour = {
                    title: {
                        textStyle:{color:'#92b1d8',fontSize:'14'},
                        y:'bottom',
                        right:'34',
                        text: '单位:万人'
                    },
                    grid: {
                        left: '4%',
                        right: '2%',
                        top: '8%',
                    },
                    legend: {
                        textStyle:{color:'#92b1d8',},
                        y:'bottom',                        
                        right:'134',
                        data:[{name:'连网用户',icon : 'bar',textStyle:{fontWeight:'bold', color:'#24573b'}},
                              {name:'上网人数',icon : 'bar',textStyle:{fontWeight:'bold', color:'#722f2f'}},
                              {name:'有效认证',icon : 'bar',textStyle:{fontWeight:'bold', color:'#32446b'}},
                            ]
                    },
                    tooltip : {
                        trigger: 'axis',
                        axisPointer: {
                            animation: false
                        }
                    },
                    xAxis : [
                        {   
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#92b1d8'                
                                },
                            },
                            type : 'category',
                            boundaryGap : false,
                            data: ['4.4','4.5','4.6','4.7','4.8','4.9','4.10']
                        }
                    ],
                    yAxis: [
                        {
                              axisLabel: {
                                    show: true,
                                    textStyle: {
                                        color: '#92b1d8'
                                    },
                            },
                            splitLine: {
                                lineStyle: {
                                    // 使用深浅的间隔色
                                    color: ['#393e4c']
                                }
                            },                            
                            name: '',
                            type: 'value'
                        }
                    ],
                    series: [
                        {
                            name:'连网用户',
                            type:'line',
                            showSymbol: false,
                            areaStyle: {normal: {}},
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },                            
                            itemStyle:{  
                                normal:{  
                                    barBorderColor:'#24573b',  
                                    color:'#24573b'
                                },
                                emphasis:{
                                    color:'#24573b'
                                },                                    
                          },                            
                            data:[50,40,30,60,90,80,70]
                        },    
                        {
                            name:'上网人数',
                            type:'line',
                            showSymbol: false,
                            areaStyle: {normal: {}},
                            lineStyle: {
                                normal: {
                                    width: 1
                                },                            
                            },
                            itemStyle:{  
                                normal:{  
                                    barBorderColor:'#722f2f',  
                                    color:'#722f2f'   
                                },
                                emphasis:{
                                    color:'#722f2f'
                                },                                    
                            },
                           
                            data:[20,30,40,50,60,70,80]
                        },                        
                        {
                            name:'有效认证',
                            type:'line',
                            showSymbol: false,
                            areaStyle: {normal: {}},
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            itemStyle:{  
                                normal:{  
                                    barBorderColor:'#32446b',  
                                    color:'#32446b'   
                                },
                                emphasis:{
                                    color:'#32446b'
                                },                                    
                            },
                          
                            data:[70,20,60,40,50,30,10]
                        },
                    ]
                };        
                myChartFour.setOption(optionFour);
}


0 0
原创粉丝点击