blob: d062f9532eb3421228ad90198e60e64ed17ac56b [file] [log] [blame]
<html>
<head>
<meta charset="utf-8">
<script src="lib/esl.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; */
}
</style>
<div id="main"></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'
}
},
highlight: {
itemStyle: {
color: 'orange'
}
},
downplay: {
itemStyle: {
color: '#ccc'
}
}
}
};
chart.setOption(option);
chart.dispatchAction({
type: 'sunburstHighlight',
targetNodeId: 'target'
});
});
</script>
</body>
</html>