配置项#
const myChart = echarts.init(document.querySelector(".demo"));
$.getJSON(
"https://geo.datav.aliyun.com/areas_v3/bound/220000_full.json",
(res) => {
echarts.registerMap("chinaMap", res);
myChart.setOption({
geo: {
type: "map",
map: "chinaMap",
roam: true,
label: {
show: true,
},
zoom: 1.3,
center: [125.3245, 43.886841],
},
});
}
);
效果图#

雷达图#
配置项#
option = {
legend: {
data: ['Allocated Budget', 'Actual Spending']
},
radar: {
indicator: [
{ name: 'Sales', max: 6500 },
{ name: 'Administration', max: 16000 },
{ name: 'Information Technology', max: 30000 },
{ name: 'Customer Support', max: 38000 },
{ name: 'Development', max: 52000 },
{ name: 'Marketing', max: 25000 }
]
},
series: [
{
name: 'Budget vs spending',
type: 'radar',
data: [
{
value: [4200, 3000, 20000, 35000, 50000, 18000],
name: 'Allocated Budget'
},
{
value: [5000, 14000, 28000, 26000, 42000, 21000],
name: 'Actual Spending'
}
],
label:{
show:true
},
areaStyle:{}
}
]
};
效果图#

仪表盘#
配置项#
option = {
series: [
{
type: 'gauge',
axisLine: {
lineStyle: {
width: 30,
color: [
[0.3, '#67e0e3'],
[0.7, '#37a2da'],
[1, '#fd666d']
]
}
},
axisTick: {
distance: -30,
length: 8,
lineStyle: {
color: '#fff',
width: 2
}
},
splitLine: {
distance: -30,
length: 30,
lineStyle: {
color: '#fff',
width: 4
}
},
axisLabel: {
color: 'auto',
distance: 40,
fontSize: 20
},
detail: {
valueAnimation: true,
formatter: '{value} km/h',
color: 'auto'
},
data: [
{
value: 80,
itemStyle:{
color: 'pink'
}
},
],
min: 40
}
]
};
效果图#

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了