echarts常用的属性修改

var option1 = {
                    tooltip: {
                        trigger: 'axis',
                        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
                            type: 'shadow',        // 默认为直线,可选为:'line' | 'shadow'
                        }
                    },
                    dataZoom: [
                        {
                            type: "inside"   // 鼠标内部可以滑滑轮展示伸缩效果
                        }
                    ],
                    legend: {
                        inactiveColor: '#666',
                        textStyle: {
                            color: '#000000A6'
                        },
                        data: []
                    },
// 距离容器四周的距离
                    grid: {
                        left: 60,
                        top: 40,
                        right: 40,
                        bottom: 30,
                    },
                    xAxis: {
                        name: '日期',
                        splitLine: {
                            show: false,
                        },
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: ['#000000A6'],
                            }
                        },
                        axisTick: {
                            inside:true,
                        },
                        boundaryGap: true,
                        type: 'category',
                        data: this.echartTime
                    },
                    yAxis: {
                        name: '数量',
                        minInterval:1, // 强制将坐标轴的坐标设置为1
                        nameTextStyle: {
                            fontSize: 15,
                            color: '#000000A6'
                        },
                        splitLine: {
                            show: true,
                            lineStyle: {
                                color: '#000000A6',
                                type : 'dotted'
                            },

                        },
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: ['#000000A6'],
                            }
                        },
                        axisTick: {
                            show: true,
                            inside:true,
                            color: ['#000000A6'],
                        },
                        type: 'value',
                        show: true,
                    },
                    series: [
                        {
                            name: '视频数量',
                            type: 'bar',
                            itemStyle: {
                                normal: {
                                    color: '#f5ad46'
                                }
                            },
                            barWidth: 20,
                            data: this.echartIndividual
                        },
                    ]
                };

 

posted @ 2020-11-12 09:49  程序猿雪儿  阅读(674)  评论(0编辑  收藏  举报