sunburst

Echarts——旭日图

流过昼夜 提交于 2020-02-01 00:27:13
旭日图 旭日图(Sunburst)由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像饼图一样表现局部和整体的占比,又能像矩形树图一样表现层级关系。 引入相关文件 旭日图是 ECharts 4.0 新增的图表类型,需要引入完整版的 echarts.min.js 最简单的旭日图 创建旭日图需要在 series 配置项中声明类型为 ‘sunburst’ 的系列,并且以树形结构声明其 data: <!DOCTYPE HTML> < html > < head > < meta http-equiv = " Content-Type " content = " text/html; charset=UTF-8 " > < title > 最简单的旭日图 </ title > < script type = " text/javascript " src = " ../js/jquery-3.4.1.min.js " > </ script > < script type = " text/javascript " src = " ../js/echarts.min.js " > </ script > </ head > < body > < div id = " main " style =" width : 400px ; height : 300px ; " > </