bugfix--副标题颜色和数值设定颜色冲突-柱状图

qianming 1 year ago
parent 8ed0802e17
commit be8e95b0b9

@ -593,7 +593,7 @@ export const widgetBarCompare = {
{ {
type: 'vue-color', type: 'vue-color',
label: '字体颜色', label: '字体颜色',
name: 'subTextColor', name: 'dataColor',
required: false, required: false,
placeholder: '', placeholder: '',
value: '#fff' value: '#fff'

@ -631,12 +631,12 @@ export const widgetBarDoubleYaxis = {
], ],
}, },
{ {
name: '折线数值设定', name: '数值设定',
list: [ list: [
{ {
type: 'el-switch', type: 'el-switch',
label: '显示', label: '显示',
name: 'isShowLine', name: 'isShow',
required: false, required: false,
placeholder: '', placeholder: '',
value: false value: false
@ -644,7 +644,7 @@ export const widgetBarDoubleYaxis = {
{ {
type: 'el-input-number', type: 'el-input-number',
label: '距离', label: '距离',
name: 'distanceLine', name: 'distance',
required: false, required: false,
placeholder: '', placeholder: '',
value: 5 value: 5
@ -652,7 +652,7 @@ export const widgetBarDoubleYaxis = {
{ {
type: 'el-input-number', type: 'el-input-number',
label: '字体字号', label: '字体字号',
name: 'fontSizeLine', name: 'fontSize',
required: false, required: false,
placeholder: '', placeholder: '',
value: 14 value: 14
@ -660,7 +660,7 @@ export const widgetBarDoubleYaxis = {
{ {
type: 'vue-color', type: 'vue-color',
label: '字体颜色', label: '字体颜色',
name: 'subTextColorLine', name: 'dataColor',
required: false, required: false,
placeholder: '', placeholder: '',
value: '#fff' value: '#fff'
@ -668,58 +668,7 @@ export const widgetBarDoubleYaxis = {
{ {
type: 'el-select', type: 'el-select',
label: '字体粗细', label: '字体粗细',
name: 'fontWeightLine', name: 'fontWeight',
required: false,
placeholder: '',
selectOptions: [
{ code: 'normal', name: '正常' },
{ code: 'bold', name: '粗体' },
{ code: 'bolder', name: '特粗体' },
{ code: 'lighter', name: '细体' }
],
value: 'normal'
},
],
},
{
name: '柱体数值设定',
list: [
{
type: 'el-switch',
label: '显示',
name: 'isShowBar',
required: false,
placeholder: '',
value: false
},
{
type: 'el-input-number',
label: '距离',
name: 'distanceBar',
required: false,
placeholder: '',
value: 5
},
{
type: 'el-input-number',
label: '字体字号',
name: 'fontSizeBar',
required: false,
placeholder: '',
value: 14
},
{
type: 'vue-color',
label: '字体颜色',
name: 'subTextColorBar',
required: false,
placeholder: '',
value: '#fff'
},
{
type: 'el-select',
label: '字体粗细',
name: 'fontWeightBar',
required: false, required: false,
placeholder: '', placeholder: '',
selectOptions: [ selectOptions: [

@ -547,7 +547,7 @@ export const widgetBarStack = {
{ {
type: 'vue-color', type: 'vue-color',
label: '字体颜色', label: '字体颜色',
name: 'subTextColor', name: 'dataColor',
required: false, required: false,
placeholder: '', placeholder: '',
value: '#fff' value: '#fff'

@ -469,7 +469,7 @@ export const widgetBarchart = {
{ {
type: 'vue-color', type: 'vue-color',
label: '字体颜色', label: '字体颜色',
name: 'subTextColor', name: 'dataColor',
required: false, required: false,
placeholder: '', placeholder: '',
value: '#fff' value: '#fff'

@ -445,7 +445,7 @@ export const widgetGradientBarchart = {
{ {
type: 'vue-color', type: 'vue-color',
label: '字体颜色', label: '字体颜色',
name: 'subTextColor', name: 'dataColor',
required: false, required: false,
placeholder: '', placeholder: '',
value: '#fff' value: '#fff'

@ -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>
@ -434,7 +434,7 @@ export default {
position: "insideLeft", position: "insideLeft",
textStyle: { textStyle: {
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}, },
}, },
@ -449,7 +449,7 @@ export default {
position: "insideRight", position: "insideRight",
textStyle: { textStyle: {
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}, },
}, },

@ -141,7 +141,6 @@ export default {
this.setOptionsTitle(); this.setOptionsTitle();
this.setOptionsX(); this.setOptionsX();
this.setOptionsY(); this.setOptionsY();
//this.setOptionsLine();
this.setOptionsBar(); this.setOptionsBar();
this.setOptionsTooltip(); this.setOptionsTooltip();
this.setOptionsData(); this.setOptionsData();
@ -306,41 +305,6 @@ export default {
]; ];
this.options.yAxis = yAxis; this.options.yAxis = yAxis;
}, },
// 线
setOptionsLine() {
const optionsSetup = this.optionsSetup;
const series = this.options.series;
for (const key in series) {
if (series[key].type == "line") {
series[key].symbol = optionsSetup.symbol;
series[key].showSymbol = optionsSetup.markPoint;
series[key].symbolSize = optionsSetup.pointSize;
series[key].smooth = optionsSetup.smoothCurve;
if (optionsSetup.area) {
series[key].areaStyle = {
opacity: optionsSetup.areaThickness / 100,
};
} else {
series[key].areaStyle = {
opacity: 0,
};
}
series[key].lineStyle = {
width: optionsSetup.lineWidth,
};
series[key].itemStyle.borderRadius = optionsSetup.radius;
series[key].label = {
show: optionsSetup.isShowLine,
position: "top",
distance: optionsSetup.distanceLine,
fontSize: optionsSetup.fontSizeLine,
color: optionsSetup.subTextColorLine,
fontWeight: optionsSetup.fontWeightLine,
};
}
}
this.options.series = series;
},
// //
setOptionsBar() { setOptionsBar() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
@ -348,12 +312,12 @@ export default {
for (const key in series) { for (const key in series) {
if (series[key].type == "bar") { if (series[key].type == "bar") {
series[key].label = { series[key].label = {
show: optionsSetup.isShowBar, show: optionsSetup.isShow,
position: "top", position: "top",
distance: optionsSetup.distanceBar, distance: optionsSetup.distance,
fontSize: optionsSetup.fontSizeBar, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColorBar, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeightBar, fontWeight: optionsSetup.fontWeight,
}; };
series[key].barWidth = optionsSetup.maxWidth; series[key].barWidth = optionsSetup.maxWidth;
series[key].barMinHeight = optionsSetup.minHeight; series[key].barMinHeight = optionsSetup.minHeight;

@ -367,7 +367,7 @@ export default {
position: "top", position: "top",
distance: 10, distance: 10,
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}, },
// //
@ -448,7 +448,7 @@ export default {
position: "top", position: "top",
distance: 10, distance: 10,
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}, },
// //

@ -237,7 +237,7 @@ export default {
distance: optionsSetup.distance, distance: optionsSetup.distance,
textStyle: { textStyle: {
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}, },
}; };
@ -247,7 +247,7 @@ export default {
position: "top", position: "top",
distance: optionsSetup.distance, distance: optionsSetup.distance,
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}; };
} }

@ -311,7 +311,7 @@ export default {
position: "right", position: "right",
distance: optionsSetup.distance, distance: optionsSetup.distance,
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}; };
} else { } else {
@ -320,7 +320,7 @@ export default {
position: "top", position: "top",
distance: optionsSetup.distance, distance: optionsSetup.distance,
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
}; };
} }

Loading…
Cancel
Save