import ChartPie27 from '../../../src/chart/pie/ChartPie27/ChartPie27.js'; import title from "../../../src/chart/commonOptions/title"; let chart=new ChartPie27(document.getElementsByClassName('c1')[0],{}); window.addEventListener("resize",()=>{ chart.resize(); }); let option = { title: title.option(''), color:['#3f90ff','#3fffa7', '#8d3cf2', '#ffd657','#fa8444', '#8d3cf2', '#ffd657','#fa8444'], legend:{ show: true, left: "right", top: '70%', orient: 'vertical', itemAngelR:10, padding:3, itemWidth: 10, itemHeight: 10, }, tooltip: { // titleColor:'#fff', bgStyle:{ backgroundColor:'rgba(0,0,0,0.7)', // borderColor:'#888e0e', // borderWidth:1 }, }, pie: { center: { x:"50%", y:"30%" }, width:"50%", detailStyle:{ fontWeight:'normal', color:'#ffffff', fontSize:14, }, circleSize: 5, circleColor: '#38e495', label: { show: true, textStyle: { fontSize: 16, fontWeight: 'normal', color: '#ffffff' } }, centerLabel:{ show: true, nameStyle: { fontSize: 16, fontWeight: 'normal', color: '#ffffff' }, valueStyle: { fontSize: 22, fontWeight: 'normal', color: '#ffffff' }, }, }, series: [{ name: ['数据一', '数据二', '数据三', '数据二', '数据三'], value: [ 25,30,15,30,15] }], bg:{ backgroundColor:"#000000" }, } setTimeout(()=>{ // chart.setOption(option); },3000);