LeftChart4.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!--
  2. * @Author: gaojikai gaojikai@fehorizon.com
  3. * @Date: 2023-09-11 14:03:09
  4. * @LastEditors: gaojikai gaojikai@fehorizon.com
  5. * @LastEditTime: 2023-09-13 15:40:20
  6. * @FilePath: \electronic-file\src\components\datav\LeftChart2.vue
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. -->
  9. <template>
  10. <div class="left-chart-4">
  11. <dv-charts class="lc2-chart" :option="option" />
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: "LeftChart4",
  17. data() {
  18. return {
  19. // option: {
  20. // xAxis: {
  21. // name: "第一周",
  22. // data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  23. // axisTick: {
  24. // show: false,
  25. // },
  26. // axisLine: {
  27. // show: true,
  28. // },
  29. // axisLabel: {
  30. // show: false,
  31. // },
  32. // nameTextStyle: {
  33. // fill: "red",
  34. // fontSize: 10,
  35. // },
  36. // },
  37. // yAxis: {
  38. // name: "销售额",
  39. // data: "value",
  40. // axisTick: {
  41. // show: false,
  42. // },
  43. // axisLine: {
  44. // show: true,
  45. // },
  46. // axisLabel: {
  47. // show: true,
  48. // },
  49. // splitLine: {
  50. // show: false,
  51. // },
  52. // },
  53. // grid: {
  54. // bottom: 10,
  55. // top: 30,
  56. // },
  57. // series: [
  58. // {
  59. // data: [0, 2, 3, 4, 5, 6, 7],
  60. // type: "bar",
  61. // barWidth: "30%",
  62. // },
  63. // ],
  64. // },
  65. option: {
  66. xAxis: {
  67. name: "第一周",
  68. data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  69. },
  70. yAxis: {
  71. name: "销售额",
  72. data: "value",
  73. splitLine: {
  74. show: false,
  75. },
  76. },
  77. grid: {
  78. bottom: 10,
  79. top: 20,
  80. },
  81. series: [
  82. {
  83. data: [1200, 2230, 1900, 2100, 3500, 4200, 3985],
  84. type: "bar",
  85. barWidth: "30%",
  86. },
  87. ],
  88. },
  89. };
  90. },
  91. };
  92. </script>
  93. <style lang="scss" scoped>
  94. .left-chart-4 {
  95. width: 100%;
  96. height: 100%;
  97. position: relative;
  98. .lc2-chart {
  99. height: calc(100% - 80px);
  100. position: relative;
  101. }
  102. }
  103. </style>