Echarts - legend屬性設置


legend: {
        orient: 'horizontal', // 'vertical'
        x: 'right', // 'center' | 'left' | {number},
        y: 'top', // 'center' | 'bottom' | {number}
        backgroundColor: '#fff',
        borderColor: 'rgba(178,34,34,0.8)',
        borderWidth: 4,
        padding: 10,    // [5, 10, 15, 20]
        itemGap: 20,
        textStyle: {color: 'red'},
        selected: {
            '降水量': false
        },
        data: [{
            name: '蒸發量',
            icon: 'circle',//'image://../asset/ico/favicon.png',//標志圖形類型,默認自動選擇(8種類型循環使用,不顯示標志圖形可設為'none'),默認循環選擇類型有:'circle' | 'rectangle' | 'triangle' | 'diamond' |'emptyCircle' | 'emptyRectangle' | 'emptyTriangle' | 'emptyDiamond'另外,還支持五種更特別的標志圖形'heart'(心形)、'droplet'(水滴)、'pin'(標注)、'arrow'(箭頭)和'star'(五角星),這並不出現在常規的8類圖形中,但無論是在系列級還是數據級上你都可以指定使用,同時,'star' + n(n>=3)可變化出N角星,如指定為'star6'則可以顯示6角星
            textStyle: {fontWeight: 'bold', color: 'green'}
        },
            '降水量', '最高氣溫', '最低氣溫'
        ]
    }

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM