echarts换主题颜色(在vue中使用)

官网:https://www.echartsjs.com/zh/index.html

1.导入(前提是已经安装了echarts)

import echarts from "echarts";
import  'echarts/theme/shine.js'

2.使用

echarts.init(
        document.getElementById("huanfu"),
        "shine"//此处是主题的名称
      );

主题名字来源于官网

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章