echarts手势缩放

echarts手势缩放,查看更详细的信息

  1.  dataZoom属性,这个属性中的type有两个可选值,一个是inside,一个是slider,其中inside是默认的pc端支持鼠标滑动,移动端支持手势缩放,slider是加了一个滑动条。
var option = {
        xAxis:{
            type:"category",
            data:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]
        },
        yAxis:{
            type:'value'
        },
        dataZoom:{
            type:'inside'
        },
        toolbox:{
            orient:'horizontal',
            feature:{
                restore:{
                    title:"还原",   
                }
            },
            itemSize:18,
            iconStyle:{
                textAlign:'rght',
            }
        },
        grid:{
            left:50
        },
        series:[
            {
                data:[10,12,13,14,20,16,17,18,29,20,21,12,23,24,30,17,15,8,24,28,29,1,8,20,16],
                type:'line',
                lineStyle:{
                    color:'green'
                },
                itemStyle:{
                    color:"tblue"
                }
            }
        ]
    }
发布了114 篇原创文章 · 获赞 67 · 访问量 12万+

猜你喜欢

转载自blog.csdn.net/qq_38880700/article/details/100011358