echarts怎么把柱狀圖變成圓角


代碼

  • 需要設置series.itemStyle.normal.barBorderRadius屬性,其中此屬性值支持 number 或 數組。
  • 如果傳遞數組,則需要傳遞四個元素,依次表示 左上,右上,右下、左下

示例代碼:

series: [
  {
    data: [10,20,70,40],
    type: 'bar',
    barWidth: '40',
    itemStyle: {
      normal: {
        barBorderRadius: [0,20,20,0]
      }
    }
  }
]

效果


免責聲明!

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



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