信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import ChartPie26 from '../../../src/chart/pie/ChartPie26/ChartPie26.js';
  2. import title from "../../../src/chart/commonOptions/title";
  3. let chart=new ChartPie26(document.getElementsByClassName('c1')[0],{});
  4. window.addEventListener("resize",()=>{
  5. chart.resize();
  6. });
  7. let option = {
  8. title: title.option(''),
  9. color:['#3f90ff','#3fffa7', '#8d3cf2', '#ffd657','#fa8444', '#8d3cf2', '#ffd657','#fa8444'],
  10. legend:{
  11. show: true,
  12. left: "right",
  13. top: '70%',
  14. orient: 'vertical',
  15. itemAngelR:10,
  16. padding:3,
  17. itemWidth: 10,
  18. itemHeight: 10,
  19. },
  20. tooltip: {
  21. // titleColor:'#fff',
  22. bgStyle:{
  23. backgroundColor:'rgba(0,0,0,0.7)',
  24. // borderColor:'#888e0e',
  25. // borderWidth:1
  26. },
  27. },
  28. pie: {
  29. center: {
  30. x:"50%",
  31. y:"30%"
  32. },
  33. width:"50%",
  34. detailStyle:{
  35. fontWeight:'normal',
  36. color:'#ffffff',
  37. fontSize:14,
  38. },
  39. circleSize: 5,
  40. circleColor: '#38e495',
  41. label: {
  42. show: true,
  43. textStyle: {
  44. fontSize: 16,
  45. fontWeight: 'normal',
  46. color: '#ffffff'
  47. }
  48. },
  49. centerLabel:{
  50. show: true,
  51. nameStyle: {
  52. fontSize: 16,
  53. fontWeight: 'normal',
  54. color: '#ffffff'
  55. },
  56. valueStyle: {
  57. fontSize: 28,
  58. fontWeight: 'normal',
  59. color: '#ffffff'
  60. },
  61. },
  62. },
  63. series: [{
  64. name: ['数据一', '数据二', '数据三', '数据二', '数据三', '数据二', '数据三', '数据二', '数据三'],
  65. value: [ 25,30,15,30,10,40,5,35,15]
  66. }],
  67. bg:{
  68. backgroundColor:"#000000"
  69. },
  70. }
  71. // setTimeout(()=>{
  72. // chart.setOption(option);
  73. // },3000);