柱状图改纵向

This commit is contained in:
老叶
2022-10-28 15:34:16 +08:00
parent 85a3704435
commit cfe57f4ec7
2 changed files with 13 additions and 2 deletions
@@ -4,7 +4,7 @@
<div>
<v-chart
ref="barChart"
style="height: 500px"
:style="'height:' + Barheight + 'px'"
:option="barChartOption"
@mousedown="barMousedown"
/>
@@ -40,7 +40,8 @@
loading: true,
dataUrl: [],
// 词云图表配置
barChartOption: {}
barChartOption: {},
Barheight: 700
};
},
computed: {
@@ -60,9 +61,16 @@
.then((data) => {
this.loading = false;
this.dataUrl = data.dataUrl;
// this.Barheight = 500 + 50 * data.dataValue.length;
//饼状图
if (data.dataTitle.length > 0) {
this.barChartOption = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value'
},
@@ -60,6 +60,9 @@
//饼状图
if (data.dataTitle.length > 0) {
this.barChartOption = {
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: data.dataTitle