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