<html>
<head>
<meta charset="utf-8">
<script src="lib/simpleRequire.js"></script>
<script src="lib/config.js"></script>
</head>
<body>
<style>
html, body, #main {
width: 100%;
height: 100%;
/* background-image: url(old_mathematics.png); */
/* background-repeat: repeat; */
}
#toolbar {
position: absolute;
left: 10px;
top: 10px;
}
</style>
<div id="main"></div>
<div id="toolbar">
<button id="highlight">Highlight</button>
<button id="downplay">Downplay</button>
</div>
<script>
var chart;
require([
'echarts'
], function (echarts) {
chart = echarts.init(document.getElementById('main'), null, {
// renderer: 'svg'
});
option = {
silent: true,
series: {
radius: ['15%', '80%'],
type: 'sunburst',
sort: null,
highlightPolicy: 'descendant',
data: [{
value: 10,
children: [{
name: 'target',
value: 4,
children: [{
value: 2,
children: [{
value: 1
}]
}, {
value: 1
}, {
value: 0.5
}]
}, {
value: 2
}]
}, {
value: 4,
children: [{
children: [{
value: 2
}]
}]
}],
label: {
rotate: 'none',
color: '#fff'
},
levels: [],
itemStyle: {
color: 'yellow',
borderWidth: 2
},
emphasis: {
itemStyle: {
color: 'red'
}