MiniSmoothArea.vue 781 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div :class="prefixCls">
  3. <div class="chart-wrapper" :style="{ height: 46 }">
  4. <v-chart :force-fit="true" :height="100" :data="dataSource" :scale="scale" :padding="[36, 0, 18, 0]">
  5. <v-tooltip />
  6. <v-smooth-line position="x*y" :size="2" />
  7. <v-smooth-area position="x*y" />
  8. </v-chart>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: 'MiniSmoothArea',
  15. props: {
  16. prefixCls: {
  17. type: String,
  18. default: 'ant-pro-smooth-area'
  19. },
  20. scale: {
  21. type: [Object, Array],
  22. required: true
  23. },
  24. dataSource: {
  25. type: Array,
  26. required: true
  27. }
  28. },
  29. data () {
  30. return {
  31. height: 100
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="less" scoped>
  37. @import "smooth.area.less";
  38. </style>