柱状对比图功能更新

qianming 3 years ago
parent 156ed9b034
commit e269ddca85

@ -7116,8 +7116,77 @@ const widgetTools = [
}, },
], ],
}, },
/*{ {
name: 'X轴设置', name: '左X轴设置',
list: [
{
type: 'el-switch',
label: '显示',
name: 'hideXLeft',
required: false,
placeholder: '',
value: true,
},
{
type: 'el-input-number',
label: '数值间隔',
name: 'splitNumberLeft',
required: false,
placeholder: '',
value: ''
},
{
type: 'vue-color',
label: '数值颜色',
name: 'XcolorLeft',
required: false,
placeholder: '',
value: '#fff',
},
{
type: 'el-input-number',
label: '数值字号',
name: 'fontSizeXLeft',
required: false,
placeholder: '',
value: 14,
},
{
type: 'vue-color',
label: '轴颜色',
name: 'lineColorXLeft',
required: false,
placeholder: '',
value: '#fff',
},
{
type: 'el-switch',
label: 'X轴线',
name: 'downSplitLineXLeft',
require: false,
placeholder: '',
value: false,
},
{
type: 'el-switch',
label: '竖分割线',
name: 'SplitLineXLeft',
require: false,
placeholder: '',
value: false,
},
{
type: 'el-switch',
label: '边框线',
name: 'upSplitLineXLeft',
require: false,
placeholder: '',
value: false,
},
],
},
{
name: '右X轴设置',
list: [ list: [
{ {
type: 'el-switch', type: 'el-switch',
@ -7217,8 +7286,8 @@ const widgetTools = [
} }
], ],
},*/ },
/*{ {
name: 'Y轴设置', name: 'Y轴设置',
list: [ list: [
{ {
@ -7309,7 +7378,7 @@ const widgetTools = [
} }
], ],
},*/ },
{ {
name: '数值设定', name: '数值设定',
list: [ list: [

@ -26,7 +26,7 @@ export default {
// //
grid: [ grid: [
{// {//
show: false, show: false,//线
left: '4%', left: '4%',
top: 60, top: 60,
bottom: 10, bottom: 10,
@ -66,7 +66,7 @@ export default {
splitNumber: 2, splitNumber: 2,
type: 'value', type: 'value',
inverse: true, inverse: true,
axisLine: { axisLine: {//线
show: false, show: false,
}, },
axisTick: { axisTick: {
@ -80,7 +80,7 @@ export default {
fontSize: 12 fontSize: 12
} }
}, },
splitLine: { // 线 splitLine: { // 线
show: true, show: true,
lineStyle: { lineStyle: {
color: '#57617f', color: '#57617f',
@ -275,9 +275,10 @@ export default {
// options // options
editorOptions() { editorOptions() {
this.setOptionsTitle(); this.setOptionsTitle();
this.setOptionsXLeft();
this.setOptionsTop(); this.setOptionsTop();
this.setOptionsTooltip(); this.setOptionsTooltip();
this.setOptionsMargin(); this.setOptionsGrid();
this.setOptionsLegend(); this.setOptionsLegend();
this.setOptionsColor(); this.setOptionsColor();
this.setOptionsData(); this.setOptionsData();
@ -296,6 +297,38 @@ export default {
}; };
this.options.title = title; this.options.title = title;
}, },
// X
setOptionsXLeft() {
const optionsSetup = this.optionsSetup;
const xAxisLeft = {
splitNumber: optionsSetup.splitNumberLeft,
type: 'value',
inverse: true,
axisLine: {//X线
show: false,
},
axisTick: {
show: false,
},
position: 'bottom',
axisLabel: { // x
show: optionsSetup.hideXLeft,
textStyle: {
color : optionsSetup.lineColorXLeft,
fontSize: optionsSetup.fontSizeXLeft
}
},
splitLine: { // 线
show: false,
lineStyle: {
color: '#57617f',
width: 1,
type: 'solid'
}
}
}
this.options.xAxis[0] = xAxisLeft;
},
// //
setOptionsTop() { setOptionsTop() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
@ -351,7 +384,7 @@ export default {
this.options.tooltip = tooltip; this.options.tooltip = tooltip;
}, },
// //
setOptionsMargin() { setOptionsGrid() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const grid = [ const grid = [
{// {//

Loading…
Cancel
Save