下载开发版本:
2.引入到html中
文件层级:
源码部分:
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
backgroundColor:'#FAFAD2',
title: {
text: '国民营销信息来源渠道',
left: 'center',
//标题栏的高度,值越大,距离顶部的距离越大
top: 50,
//标题栏字体的颜色
textStyle: {
color: '#FFD700'
}
},
tooltip : {
trigger: 'item',
formatter: "{a}
{b} : {c} ({d}%)"
},
visualMap: {
show: false,
//饼图中在最大值最小值颜色范围中的亮度,值越大颜色越深
min:10,
max: 600,
inRange