柱线图调整,去掉图例

qianming 3 years ago
parent 95ac1cf6c2
commit fe08b9392c

@ -129,7 +129,7 @@ export default {
return data
}
},
// 柱状图、折线图、柱图
// 柱状图、折线图、线
barOrLineChartFn(chartProperties, data) {
const ananysicData = {};
const xAxisList = [];

@ -1,5 +1,5 @@
/*
* @Descripttion: 线图
* @Descripttion: 线图
* @version:
* @Author: qianlishi
* @Date: 2021-08-29 07:26:48
@ -595,7 +595,7 @@ export const widgetBarlinechart = {
list: [
{
type: 'el-switch',
label: '图例',
label: '显示',
name: 'isShowLegend',
required: false,
placeholder: '',
@ -610,7 +610,7 @@ export const widgetBarlinechart = {
value: '#fff',
},
{
type: 'el-input-text',
type: 'el-input-number',
label: '字体大小',
name: 'lengedFontSize',
required: false,
@ -632,10 +632,11 @@ export const widgetBarlinechart = {
required: false,
placeholder: '',
selectOptions: [
{code: 'center', name: '居中'},
{code: 'left', name: '左对齐'},
{code: 'right', name: '右对齐'},
],
value: ''
value: 'center'
},
{
type: 'el-select',
@ -647,7 +648,7 @@ export const widgetBarlinechart = {
{code: 'top', name: '顶部'},
{code: 'bottom', name: '底部'},
],
value: ''
value: 'top'
},
{
type: 'el-select',
@ -659,7 +660,7 @@ export const widgetBarlinechart = {
{code: 'vertical', name: '竖排'},
{code: 'horizontal', name: '横排'},
],
value: ''
value: 'horizontal'
},
],
},

@ -31,7 +31,6 @@ export default {
textStyle: {
color: "#fff"
},
data: ["货运量", "货运总量"]
},
xAxis: [
{
@ -139,7 +138,7 @@ export default {
this.setOptionsTooltip();
this.setOptionsData();
this.setOptionsMargin();
this.setOptionsLegend();
//this.setOptionsLegend();
this.setOptionsColor();
},
//
@ -341,23 +340,23 @@ export default {
};
this.options.grid = grid;
},
// legend
/* // 图例操作 legend
setOptionsLegend() {
const optionsCollapse = this.optionsSetup;
const legend = this.options.legend;
legend.show = optionsCollapse.isShowLegend;
legend.left = optionsCollapse.lateralPosition == "left" ? 0 : "auto";
legend.right = optionsCollapse.lateralPosition == "right" ? 0 : "auto";
legend.left = optionsCollapse.lateralPosition;
legend.top = optionsCollapse.longitudinalPosition == "top" ? 0 : "auto";
legend.bottom =
optionsCollapse.longitudinalPosition == "bottom" ? 0 : "auto";
legend.orient = optionsCollapse.layoutFront;
legend.textStyle = {
color: optionsCollapse.lengedColor,
fontSize: optionsCollapse.fontSize
fontSize: optionsCollapse.lengedFontSize
};
legend.itemWidth = optionsCollapse.lengedWidth;
},
console.log(legend);
},*/
//
setOptionsColor() {
const optionsCollapse = this.optionsSetup;
@ -373,7 +372,6 @@ export default {
//
setOptionsData() {
const optionsData = this.optionsData; // or
console.log(optionsData);
optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

Loading…
Cancel
Save