柱状图改纵向
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user