配置项如下
option = {
backgroundColor: '#161627',
tooltip : {
trigger: 'axis'
},
color:['#65f5f3','#db23eb'],
legend: {
orient : 'vertical',
x : 'right',
y : 'bottom',
textStyle:{color:'#999'},
data:['范畴一','范畴二']
},
polar : [
{
indicator : [
{ text: '外购热力', max: 6000},
{ text: '外购电力', max: 16000},
{ text: '逸散排放', max: 30000},
{ text: '制程排放', max: 38000},
{ text: '移动燃烧排放', max: 25000},
{ text: '固定燃烧排放', max: 52000}
],
// shape: 'circle',
axisLine: { // 坐标轴线
show: true, // 默认显示,属性show控制显示与否
lineStyle: { // 属性lineStyle控制线条样式
color: '#999',
width:0.5,
type: 'dashed'
}
},
splitArea: {
areaStyle: {
color: ['rgba(34, 48,100, 0.8)',
'rgba(5, 20, 96, 0.8)', 'rgba(34, 48, 101 0.6)',
'rgba(5, 20,96, 0.7)', 'rgba(5, 20, 100, 0.6)', 'rgba(5, 20, 96, 0.8)'],
shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowBlur: 1
}
},
name:{
textStyle:{color:'#c6d5de'}
}
}
],
calculable : true,
series : [
{
name: '范畴',
type: 'radar',
itemStyle: {//图形样式,可设置图表内图形的默认样式和强调样式(悬浮时样式):
normal: {
areaStyle: {
type: 'default',
color:['rgba(101,245,243,0.3)','rgba(101,250,250,0.6)']
}
}
},
data : [
{
value : [0, 0, 20000, 12000, 20000, 30000],
name : '范畴一'
},
{
value : [5000, 14000, ],
name : '范畴二'
}
]
}
]
};