echarts 部分配置

标题

title: {
                        show: true,
                        text: '2019年降雨量',
                        left: 'center'//居中
                    },

颜色块显示

legend: {
                        show: true,
                        data:['2019年降雨量'],
                        left: '30'//距离左边30px
                    },

颜色分配

color: ['#3398DB','#c23531'],

表格边距

grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        containLabel: true
                    },

横坐标

xAxis : [
                        {
                            type : 'category',
                            data :data.name,//数据
                            axisTick: {
                                alignWithLabel: true
                            },
                            axisLabel: {
                                            fontSize:16,//横坐标文字字号
                                            fontFamily:'微软雅黑',
                                            margin: 20,
                                            show:true,
                                        }
                        }
                    ],

纵坐标

yAxis : [
                        {
                            type : 'value',
                        }
                    ],

图形相关

series : [
                        {
                            name:'直接访问',
                            type:'bar',
                            barWidth: '30',//柱状图宽度
                            label: {
                                show: true,
                                color: '#000',
                                position:['50%',-20],
                                fontSize: 12
                            },
                            data:data.count
                        },

                    ]

版权声明:本文为weixin_43978427原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。