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

qianming 1 year ago
parent 8ed0802e17
commit be8e95b0b9

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

@ -631,12 +631,12 @@ export const widgetBarDoubleYaxis = {
],
},
{
name: '折线数值设定',
name: '数值设定',
list: [
{
type: 'el-switch',
label: '显示',
name: 'isShowLine',
name: 'isShow',
required: false,
placeholder: '',
value: false
@ -644,7 +644,7 @@ export const widgetBarDoubleYaxis = {
{
type: 'el-input-number',
label: '距离',
name: 'distanceLine',
name: 'distance',
required: false,
placeholder: '',
value: 5
@ -652,7 +652,7 @@ export const widgetBarDoubleYaxis = {
{
type: 'el-input-number',
label: '字体字号',
name: 'fontSizeLine',
name: 'fontSize',
required: false,
placeholder: '',
value: 14
@ -660,7 +660,7 @@ export const widgetBarDoubleYaxis = {
{
type: 'vue-color',
label: '字体颜色',
name: 'subTextColorLine',
name: 'dataColor',
required: false,
placeholder: '',
value: '#fff'
@ -668,58 +668,7 @@ export const widgetBarDoubleYaxis = {
{
type: 'el-select',
label: '字体粗细',
name: 'fontWeightLine',
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',
name: 'fontWeight',
required: false,
placeholder: '',
selectOptions: [

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

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

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

@ -1,6 +1,6 @@
<template>
<div :style="styleObj">
<v-chart ref="myVChart" :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize/>
</div>
</template>
@ -434,7 +434,7 @@ export default {
position: "insideLeft",
textStyle: {
fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor,
color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight,
},
},
@ -449,7 +449,7 @@ export default {
position: "insideRight",
textStyle: {
fontSize: optionsSetup.fontSize,
color: optionsSetup.subTextColor,
color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight,
},
},
@ -596,10 +596,10 @@ export default {
optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(
optionsData.dynamicData,
optionsData.refreshTime,
optionsSetup
);
optionsData.dynamicData,
optionsData.refreshTime,
optionsSetup
);
},
//
setUnique(arr) {

@ -141,7 +141,6 @@ export default {
this.setOptionsTitle();
this.setOptionsX();
this.setOptionsY();
//this.setOptionsLine();
this.setOptionsBar();
this.setOptionsTooltip();
this.setOptionsData();
@ -306,41 +305,6 @@ export default {
];
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() {
const optionsSetup = this.optionsSetup;
@ -348,12 +312,12 @@ export default {
for (const key in series) {
if (series[key].type == "bar") {
series[key].label = {
show: optionsSetup.isShowBar,
show: optionsSetup.isShow,
position: "top",
distance: optionsSetup.distanceBar,
fontSize: optionsSetup.fontSizeBar,
color: optionsSetup.subTextColorBar,
fontWeight: optionsSetup.fontWeightBar,
distance: optionsSetup.distance,
fontSize: optionsSetup.fontSize,
color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight,
};
series[key].barWidth = optionsSetup.maxWidth;
series[key].barMinHeight = optionsSetup.minHeight;

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

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

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

Loading…
Cancel
Save