|
@@ -44,7 +44,7 @@ export default {
|
|
|
top: "30%",
|
|
|
left: "6%",
|
|
|
right: "6%",
|
|
|
- bottom: "5%",
|
|
|
+ bottom: "2%",
|
|
|
containLabel: true,
|
|
|
},
|
|
|
color: ["#186bb8", "#4ee1ac", "#efc943"],
|
|
@@ -151,6 +151,17 @@ export default {
|
|
|
],
|
|
|
series: [],
|
|
|
};
|
|
|
+
|
|
|
+ option.xAxis[0].axisLabel.interval = 0;
|
|
|
+ option.xAxis[0].axisLabel.rotate = obj.rotate || 0;
|
|
|
+ option.xAxis[0].axisLabel.margin = 20;
|
|
|
+ option.xAxis[0].axisLabel.formatter = function (value) {
|
|
|
+ // 使用\n手动换行,或者使用CSS样式white-space: normal;
|
|
|
+ return value.length > 4
|
|
|
+ ? value.slice(0, 4) + "..." // "\n" + value.slice(4)
|
|
|
+ : value;
|
|
|
+ };
|
|
|
+
|
|
|
if (!obj.result) obj.result = [[], [], [], []];
|
|
|
if (!obj.legend_data) obj.legend_data = ["", "", "", ""];
|
|
|
if (!obj.legendmap)
|
|
@@ -184,6 +195,36 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ if (obj.dataZoom) {
|
|
|
+ option.dataZoom = [
|
|
|
+ {
|
|
|
+ show: true,
|
|
|
+ height: 12,
|
|
|
+ xAxisIndex: [0],
|
|
|
+ top: "92%",
|
|
|
+ startValue: 0,
|
|
|
+ endValue: 5,
|
|
|
+ handleIcon:
|
|
|
+ "path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z",
|
|
|
+ handleSize: "110%",
|
|
|
+ handleStyle: {
|
|
|
+ color: "#d3dee5",
|
|
|
+ },
|
|
|
+ textStyle: {
|
|
|
+ color: "#333",
|
|
|
+ },
|
|
|
+ borderColor: "#90979c",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "inside",
|
|
|
+ show: true,
|
|
|
+ height: 15,
|
|
|
+ start: 1,
|
|
|
+ end: 35,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
this.chart.setOption(option);
|
|
|
// this.chart.on("legendselectchanged", function (params) {
|
|
|
// let iseyes = params.selected[params.name];
|