|
|
@ -1,14 +1,22 @@ |
|
|
|
import * as echarts from "echarts"; |
|
|
|
window.radarData = {'交通特征':9,'拥挤度':8,'饱和度':5,} |
|
|
|
|
|
|
|
let options = { |
|
|
|
legend: { |
|
|
|
show: false, |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
trigger: "item", |
|
|
|
formatter: function (params, ticket, callback) { |
|
|
|
let data = params.data; |
|
|
|
return `交通特征: ${data.value[0]}<br>拥挤度: ${data.value[1]}<br>饱和度: ${data.value[2]}`; |
|
|
|
}, |
|
|
|
}, |
|
|
|
radar: [ |
|
|
|
{ |
|
|
|
indicator: [ |
|
|
|
{ text: "Indicator1" }, |
|
|
|
{ text: "Indicator2" }, |
|
|
|
{ text: "Indicator3" }, |
|
|
|
{ name: "交通特征",max: 10 }, |
|
|
|
{ name: "拥挤度" ,max: 10}, |
|
|
|
{ name: "饱和度",max: 10 }, |
|
|
|
], |
|
|
|
center: ["50%", "55%"], |
|
|
|
radius: 70, |
|
|
@ -16,7 +24,9 @@ let options = { |
|
|
|
splitNumber: 4, |
|
|
|
shape: "circle", |
|
|
|
axisName: { |
|
|
|
formatter: "{value}", |
|
|
|
formatter: function (value) { |
|
|
|
return value + ' '+ (radarData[value] / 10 * 100) + "%"; |
|
|
|
}, |
|
|
|
color: "#428BD4", |
|
|
|
}, |
|
|
|
splitArea: { |
|
|
@ -45,8 +55,8 @@ let options = { |
|
|
|
}, |
|
|
|
data: [ |
|
|
|
{ |
|
|
|
value: [1, 5, 1], |
|
|
|
name: "Data B", |
|
|
|
value: [9,8,5], |
|
|
|
name: "月指标", |
|
|
|
areaStyle: { |
|
|
|
color: { |
|
|
|
type: "linear", |
|
|
@ -56,12 +66,12 @@ let options = { |
|
|
|
y2: 1, |
|
|
|
colorStops: [ |
|
|
|
{ |
|
|
|
offset: 0.1, |
|
|
|
offset: 0, |
|
|
|
color: "#DC6A00", // 0% 处的颜色
|
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 0.5, |
|
|
|
color: "#5D887C", // 100% 处的颜色
|
|
|
|
color: "#5D887C", // 50% 处的颜色
|
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 1, |
|
|
|