pinhuan.js 953 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*大屏*/
  2. (function () {
  3. 'use strict';
  4. var myChart = echarts.init(document.getElementById('left-bottom-nong'));
  5. // 指定图表的配置项和数据
  6. var option = {
  7. tooltip: {},
  8. series: [{
  9. name: '销量',
  10. type: 'pie',
  11. radius: ['30%', '60%'],
  12. right: '20%',
  13. data: [{
  14. value: 200,
  15. name: '在线',
  16. itemStyle: {
  17. color: '#5ba3ed'
  18. }
  19. },
  20. {
  21. value: 30,
  22. name: '不在线',
  23. itemStyle: {
  24. color: '#a0fffe'
  25. }
  26. },
  27. ]
  28. }]
  29. };
  30. // 使用刚指定的配置项和数据显示图表。
  31. myChart.setOption(option);
  32. window.addEventListener('resize',function(){
  33. myChart.resize();
  34. })
  35. })()