incomeAnalysis.vue 901 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!-- 收入分析 -->
  2. <template>
  3. <view class="revenue">
  4. <view class="revenue-line">
  5. <ColumnChart :chartData="chartData" :title="title" :opts="opts"/>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import ColumnChart from '@/components/columnChart.vue'
  11. export default {
  12. components: {
  13. ColumnChart
  14. },
  15. props: {
  16. title: {
  17. type: String,
  18. default: ''
  19. },
  20. chartData: {
  21. type: Object,
  22. default: () => {
  23. return {}
  24. }
  25. },
  26. opts: {
  27. type: Object,
  28. default: () => {
  29. return {
  30. xAxis: {
  31. rotateLabel: false,
  32. labelCount: 6
  33. },
  34. yAxis: {
  35. showTitle: true,
  36. splitNumber: 5,
  37. data: [{
  38. title: '元',
  39. titleOffsetY: -5
  40. }]
  41. },
  42. legend: {
  43. show: false
  44. },
  45. dataLabel: false,
  46. extra: {
  47. column: {
  48. width: 20
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }
  55. }
  56. </script>