common.js 868 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. function commonChartProps () {
  2. return {
  3. chartHeigth: {
  4. type: String,
  5. default: '320px',
  6. },
  7. /* 图例显示 */
  8. showLegend: {
  9. type: Boolean,
  10. default: false,
  11. },
  12. /* 数据格式
  13. * http://numeraljs.com/
  14. * https://vue-echarts.github.io/guide/format.html
  15. * */
  16. yAxisFormat: {
  17. type: String,
  18. default: '0.[00]',
  19. },
  20. /* 图数据 */
  21. chartData: {
  22. type: Object,
  23. required: true,
  24. },
  25. /* 图表自身的属性 */
  26. chartSetting: {
  27. type: Object,
  28. default: () => ({}),
  29. },
  30. chartExtend: {
  31. type: Object,
  32. default: () => ({}),
  33. },
  34. /* 图表事件绑定 */
  35. chartEvents: {
  36. type: Object,
  37. default: () => ({}),
  38. },
  39. loading: {
  40. type: Boolean,
  41. default: false,
  42. },
  43. }
  44. }
  45. export default commonChartProps