- const box1 = document.querySelector('#box1');
- const box2 = document.querySelector('#box2');
- const box3 = document.querySelector('#box3');
- const box4 = document.querySelector('#box4');
- const box5 = document.querySelector('#box5');
- const box6 = document.querySelector('#box6');
- const box7 = document.querySelector('#box7');
- const box8 = document.querySelector('#box8');
- const box9 = document.querySelector('#box9');
- var myChart1 = echarts.init(box1);
- var option1, option2;
- option1 = {
- legend: {
- orient: 'vertical',
- x: 'right',
- y: 'center',
- itemStyle: {
- borderCap: 'round',
- },
- },
- series: [
- {
- name: 'Nightingale Chart',
- type: 'pie',
- radius: [5, 50],
- center: ['50%', '50%'],
- roseType: 'radius',
- itemStyle: {
- itemGap: 10,
- // borderRadius: 3
- },
- data: [
- { value: 50, name: 'rose 1' },
- { value: 20, name: 'rose 2' },
- { value: 50, name: 'rose 3' },
- { value: 20, name: 'rose 4' },
- ]
- }
- ]
- };
- option1 && myChart1.setOption(option1);
复制代码
|