echarts图表模型属性配置-仅个人项目使用

51次阅读

共计 604 个字符,预计需要花费 2 分钟才能阅读完成。

// 配置代码
return {

        tooltip: {trigger: 'axis'},
        legend: {
            data: this.state.legend_total,
            y: 'bottom'
        },
        grid: {
            left: '4%',
            right: '4%',
            bottom: '12%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            axisLine: {onZero: false},
            data: this.state.xAxis_total
        },
        toolbox: {
            show: true,
            right: 120,
            top: 20,
            feature: {
                dataZoom: {yAxisIndex: false,},
                brush: {type: ['clear']
                }
            }
        },
        brush: {
            xAxisIndex: 'all',
            brushLink: 'all',
            outOfBrush: {colorAlpha: 0.1}
        },
        dataZoom: [
            {
                show: true,
                realtime: true,
                start: 0,
                end: 100,
                bottom: 28
            },
            {
                type: 'inside',
                realtime: true,
                start: 0,
                end: 100,
                zoomOnMouseWheel: false
            }
        ],
        yAxis: {
            type: 'value',
            scale: true,
        },
        series: this.state.series_total
    }

正文完
 0