123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <echarts :option="option" :loading="loading"></echarts>
- </template>
-
- <script>
- export default {
- name: 'LineChart',
- props: {
- option: {
- type: Object,
- default: () => ({})
- },
- value: {
- type: Array,
- default: () => []
- },
- loading: Boolean
- },
- computed: {
- opt() {
- return {
- xAxis: {
- type: 'category',
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- type: 'line',
- smooth: true
- }
- ],
- dimensions: ['key', 'value'],
- source: this.value,
- ...this.option,
- }
- }
- },
- data() {
- return {
- }
- }
- }
- </script>
|