123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <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>
|