web前端全系列 教程
1839个小节阅读:2244.1k
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
旭日图由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像饼图一样表现局部和整体的占比,又能像矩形树图一样表现层级关系
xxxxxxxxxx
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./echarts.js"></script>
</head>
<body>
<div id="root" style="width:800px;height:600px"></div>
<script>
var myChart = echarts.init(document.getElementById("root"))
var data = [
{
name: 'Grandpa',
children: [
{
name: 'Uncle Leo',
value: 15,
children: [
{
name: 'Cousin Jack',
value: 2
},
{
name: 'Cousin Mary',
value: 5,
children: [
{
name: 'Jackson',
value: 2
}
]
},
{
name: 'Cousin Ben',
value: 4
}
]
},
{
name: 'Father',
value: 10,
children: [
{
name: 'Me',
value: 5
},
{
name: 'Brother Peter',
value: 1
}
]
}
]
},
{
name: 'Nancy',
children: [
{
name: 'Uncle Nike',
children: [
{
name: 'Cousin Betty',
value: 1
},
{
name: 'Cousin Jenny',
value: 2
}
]
}
]
}
]
var option = {
series: {
type: 'sunburst',
data: data,
radius: ['10%', '90%']
}
};
myChart.setOption(option)
</script>
</body>
</html>
实时效果反馈
1. ECharts实现旭日图,type
属性应设置为什么:
A radar
B pie
C tree
D sunburst
答案
1=>D