去掉折线图

This commit is contained in:
老叶
2022-11-21 17:46:51 +08:00
parent 5b4aa28f11
commit a0f5168156
@@ -47,42 +47,42 @@
</div>
</template>
</ele-pro-table>
<div style="margin-top: 40px" v-if="areaChartOption.legend.data.length > 0">
<!-- <div style="margin-top: 40px" v-if="areaChartOption.legend.data.length > 0">
<v-chart
ref="areaChart"
style="width: 100%; height: 500px"
:option="areaChartOption"
/>
</div>
</div> -->
</el-card>
</template>
<script>
import { pageStatisticsArea } from '@/api/sylive/activity';
import { use } from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import { LineChart } from 'echarts/charts';
import {
LegendComponent,
GridComponent,
ToolboxComponent,
TooltipComponent
} from 'echarts/components';
import VChart from 'vue-echarts';
import 'echarts-wordcloud';
import { echartsMixin } from '@/utils/echarts-mixin';
use([
CanvasRenderer,
GridComponent,
TooltipComponent,
LegendComponent,
ToolboxComponent,
LineChart
]);
// import { use } from 'echarts/core';
// import { CanvasRenderer } from 'echarts/renderers';
// import { LineChart } from 'echarts/charts';
// import {
// LegendComponent,
// GridComponent,
// ToolboxComponent,
// TooltipComponent
// } from 'echarts/components';
// import VChart from 'vue-echarts';
// import 'echarts-wordcloud';
// import { echartsMixin } from '@/utils/echarts-mixin';
// use([
// CanvasRenderer,
// GridComponent,
// TooltipComponent,
// LegendComponent,
// ToolboxComponent,
// LineChart
// ]);
export default {
components: { VChart },
mixins: [echartsMixin(['areaChart'])],
// components: { VChart },
// mixins: [echartsMixin(['areaChart'])],
props: { data: { days: [], goods: [] } },
data() {
return {
@@ -159,12 +159,12 @@
showOverflowTooltip: true,
minWidth: 110
}
],
areaChartOption: {
legend: {
data: []
}
} //折线图
]
// areaChartOption: {
// legend: {
// data: []
// }
// } //折线图
};
},
methods: {
@@ -177,44 +177,44 @@
const day = this.day;
const itemId = this.itemId;
//更新折线图
pageStatisticsArea({
...order,
page,
limit,
activityId,
day,
itemId
}).then((res) => {
this.areaChartOption = {
tooltip: {
trigger: 'axis'
},
legend: {
data: res.chart.legendData
},
grid: {
left: '3%',
right: '4%',
top: '12%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: res.chart.xAxisData
},
yAxis: {
type: 'value'
},
series: res.chart.yAxisSeries
};
});
// pageStatisticsArea({
// ...order,
// page,
// limit,
// activityId,
// day,
// itemId
// }).then((res) => {
// this.areaChartOption = {
// tooltip: {
// trigger: 'axis'
// },
// legend: {
// data: res.chart.legendData
// },
// grid: {
// left: '3%',
// right: '4%',
// top: '12%',
// bottom: '3%',
// containLabel: true
// },
// toolbox: {
// feature: {
// saveAsImage: {}
// }
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: res.chart.xAxisData
// },
// yAxis: {
// type: 'value'
// },
// series: res.chart.yAxisSeries
// };
// });
return pageStatisticsArea({
...order,
page,