1. 程式人生 > >echarts-去掉X軸、Y軸和網格線

echarts-去掉X軸、Y軸和網格線

   $(function(){    function randomDataArray() {        var d = [];        var arr = [3,5,7,9,10,1,2,4,8,6];        var len = 10;        for(var i=0;i<len;i++)        {         d.push([i+1,0,arr[i],]);        }                return d;    }              var chart = document.getElementById('chart');                  var
echart = echarts.init(chart);                                    var option = {        legend: {            data:['scatter1'],            show:false        },        textStyle:{         fontSize:16        },        xAxis : [            {                type : 'value',                splitNumber: 2,                scale
: true,                show:false,                splitLine:{          show:false        }            }        ],        yAxis : [            {                type : 'value',                splitNumber: 2,                scale: true,                show:false,                splitLine:{          show
:false         }            }        ],        series : [            {                name:'scatter1',                type:'scatter',                symbol: 'emptyCircle',                symbolSize: 20,                itemStyle : {                  normal: {                  label:{                   show: true,                    position: 'inside',                   textStyle : {                                fontSize : 24,                                fontFamily : '微軟雅黑',                                color:'#FF0000'                            }                  }                 }                },                data: randomDataArray()            }        ]    };                                    echart.setOption(option);     });