EchartPictorialBar 象形图

TIP

1.1.0+

  1. <!-- 导入需要的包 -->
  2. <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.2.1/echarts.min.js"></script>

象形图 - 图1

  1. <avue-echart-pictorialbar ref="echart" :option="config" :data="data" width="1000"></avue-echart-pictorialbar>
  2. <script>
  3. export default {
  4. data() {
  5. return {
  6. data: [{
  7. "name": "PC",
  8. "value": 97,
  9. "url": "http://www.baidu.com"
  10. },
  11. {
  12. "name": "iOS",
  13. "value": 50,
  14. "url": "http://www.baidu.com"
  15. },
  16. {
  17. "name": "Android",
  18. "value": 59,
  19. "url": "http://www.baidu.com"
  20. },
  21. {
  22. "name": "windows phone",
  23. "value": 29
  24. },
  25. {
  26. "name": "Black berry",
  27. "value": 3
  28. },
  29. {
  30. "name": "Nokia S60",
  31. "value": 2
  32. },
  33. {
  34. "name": "Nokia S90",
  35. "value": 1
  36. }
  37. ],
  38. config: {
  39. symbolSize: 30,
  40. split: 30,
  41. fontSize: '24',
  42. xAxisShow: false,
  43. yAxisShow: true,
  44. color: '#4dffff',
  45. nameColor: '#564AA3',
  46. xNameFontSize: '24',
  47. yNameFontSize: '24'
  48. }
  49. }
  50. },
  51. }
  52. </script>