|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div :style="styleObj">
|
|
<div :style="styleObj">
|
|
- <v-chart ref="myVChart" :options="options" autoresize />
|
|
|
|
|
|
+ <v-chart ref="myVChart" :options="options" autoresize/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -304,7 +304,7 @@ export default {
|
|
const tooltip = {
|
|
const tooltip = {
|
|
show: optionsSetup.isShowTooltip,
|
|
show: optionsSetup.isShowTooltip,
|
|
trigger: optionsSetup.tooltipTrigger,
|
|
trigger: optionsSetup.tooltipTrigger,
|
|
- axisPointer:{
|
|
|
|
|
|
+ axisPointer: {
|
|
type: optionsSetup.tooltipAxisPointerType,
|
|
type: optionsSetup.tooltipAxisPointerType,
|
|
},
|
|
},
|
|
textStyle: {
|
|
textStyle: {
|
|
@@ -394,10 +394,10 @@ export default {
|
|
optionsData.dataType == "staticData"
|
|
optionsData.dataType == "staticData"
|
|
? this.staticDataFn(optionsData.staticData, optionsSetup)
|
|
? this.staticDataFn(optionsData.staticData, optionsSetup)
|
|
: this.dynamicDataFn(
|
|
: this.dynamicDataFn(
|
|
- optionsData.dynamicData,
|
|
|
|
- optionsData.refreshTime,
|
|
|
|
- optionsSetup
|
|
|
|
- );
|
|
|
|
|
|
+ optionsData.dynamicData,
|
|
|
|
+ optionsData.refreshTime,
|
|
|
|
+ optionsSetup
|
|
|
|
+ );
|
|
},
|
|
},
|
|
//去重
|
|
//去重
|
|
setUnique(arr) {
|
|
setUnique(arr) {
|
|
@@ -449,12 +449,12 @@ export default {
|
|
name: yAxisList[i],
|
|
name: yAxisList[i],
|
|
type: "bar",
|
|
type: "bar",
|
|
data: bar,
|
|
data: bar,
|
|
- barGap: "0%",
|
|
|
|
- stack : this.getStackStyle(),
|
|
|
|
|
|
+ barGap: optionsSetup.barGap + "%",
|
|
|
|
+ stack: this.getStackStyle(),
|
|
barWidth: optionsSetup.maxWidth,
|
|
barWidth: optionsSetup.maxWidth,
|
|
label: {
|
|
label: {
|
|
show: optionsSetup.isShowBar,
|
|
show: optionsSetup.isShowBar,
|
|
- position: "top",
|
|
|
|
|
|
+ position: optionsSetup.fontPositionBar,
|
|
distance: optionsSetup.distanceBar,
|
|
distance: optionsSetup.distanceBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
color: optionsSetup.subTextColorBar,
|
|
color: optionsSetup.subTextColorBar,
|
|
@@ -468,6 +468,17 @@ export default {
|
|
barBorderRadius: optionsSetup.radius,
|
|
barBorderRadius: optionsSetup.radius,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ //柱体背景属性
|
|
|
|
+ showBackground: optionsSetup.isShowBackground,
|
|
|
|
+ backgroundStyle: {
|
|
|
|
+ color: optionsSetup.backgroundStyleColor,
|
|
|
|
+ borderColor: optionsSetup.backgroundStyleBorderColor,
|
|
|
|
+ borderWidth: optionsSetup.backgroundStyleBorderWidth,
|
|
|
|
+ borderType: optionsSetup.backgroundStyleBorderType,
|
|
|
|
+ shadowBlur: optionsSetup.backgroundStyleShadowBlur,
|
|
|
|
+ shadowColor: optionsSetup.backgroundStyleShadowColor,
|
|
|
|
+ opacity: optionsSetup.backgroundStyleOpacity / 100,
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
for (let i = 0; i < yAxisList.length; i++) {
|
|
for (let i = 0; i < yAxisList.length; i++) {
|
|
@@ -498,7 +509,7 @@ export default {
|
|
},
|
|
},
|
|
label: {
|
|
label: {
|
|
show: optionsSetup.isShowLine,
|
|
show: optionsSetup.isShowLine,
|
|
- position: "top",
|
|
|
|
|
|
+ position: optionsSetup.fontPositionLine,
|
|
distance: optionsSetup.distanceLine,
|
|
distance: optionsSetup.distanceLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
color: optionsSetup.subTextColorLine,
|
|
color: optionsSetup.subTextColorLine,
|
|
@@ -582,12 +593,12 @@ export default {
|
|
name: legendName[i],
|
|
name: legendName[i],
|
|
type: "bar",
|
|
type: "bar",
|
|
data: bar,
|
|
data: bar,
|
|
- barGap: "0%",
|
|
|
|
- stack : this.getStackStyle(),
|
|
|
|
|
|
+ barGap: optionsSetup.barGap + "%",
|
|
|
|
+ stack: this.getStackStyle(),
|
|
barWidth: optionsSetup.maxWidth,
|
|
barWidth: optionsSetup.maxWidth,
|
|
label: {
|
|
label: {
|
|
show: optionsSetup.isShowBar,
|
|
show: optionsSetup.isShowBar,
|
|
- position: "top",
|
|
|
|
|
|
+ position: optionsSetup.fontPositionBar,
|
|
distance: optionsSetup.distanceBar,
|
|
distance: optionsSetup.distanceBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
color: optionsSetup.subTextColorBar,
|
|
color: optionsSetup.subTextColorBar,
|
|
@@ -601,6 +612,17 @@ export default {
|
|
barBorderRadius: optionsSetup.radius,
|
|
barBorderRadius: optionsSetup.radius,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ //柱体背景属性
|
|
|
|
+ showBackground: optionsSetup.isShowBackground,
|
|
|
|
+ backgroundStyle: {
|
|
|
|
+ color: optionsSetup.backgroundStyleColor,
|
|
|
|
+ borderColor: optionsSetup.backgroundStyleBorderColor,
|
|
|
|
+ borderWidth: optionsSetup.backgroundStyleBorderWidth,
|
|
|
|
+ borderType: optionsSetup.backgroundStyleBorderType,
|
|
|
|
+ shadowBlur: optionsSetup.backgroundStyleShadowBlur,
|
|
|
|
+ shadowColor: optionsSetup.backgroundStyleShadowColor,
|
|
|
|
+ opacity: optionsSetup.backgroundStyleOpacity / 100,
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
for (let i = 0; i < legendName.length; i++) {
|
|
for (let i = 0; i < legendName.length; i++) {
|
|
@@ -630,7 +652,7 @@ export default {
|
|
},
|
|
},
|
|
label: {
|
|
label: {
|
|
show: optionsSetup.isShowLine,
|
|
show: optionsSetup.isShowLine,
|
|
- position: "top",
|
|
|
|
|
|
+ position: optionsSetup.fontPositionLine,
|
|
distance: optionsSetup.distanceLine,
|
|
distance: optionsSetup.distanceLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
color: optionsSetup.subTextColorLine,
|
|
color: optionsSetup.subTextColorLine,
|