|
@@ -213,6 +213,7 @@
|
|
|
data: [],
|
|
|
type: "line",
|
|
|
smooth: true,
|
|
|
+ showSymbol: false,
|
|
|
label: {
|
|
|
show: true,
|
|
|
position: "top",
|
|
@@ -245,6 +246,7 @@
|
|
|
data: [],
|
|
|
type: "line",
|
|
|
smooth: true,
|
|
|
+ showSymbol: false,
|
|
|
label: {
|
|
|
show: true,
|
|
|
position: "top",
|
|
@@ -266,7 +268,7 @@
|
|
|
}
|
|
|
console.log(this.option.series, 'this.option.series');
|
|
|
}
|
|
|
- // 如果车辆温度数组为空,则其它数组前移一位
|
|
|
+ //如果车辆温度数组为空,则其它数组前移一位
|
|
|
for (let i = 1;;) {
|
|
|
if (this.option.series[0].data.length == 0) {
|
|
|
for (let j = 0; j < this.option.series.length - i; j++) {
|
|
@@ -299,16 +301,22 @@
|
|
|
//地图初始化
|
|
|
initMap() {
|
|
|
AMapLoader.load({
|
|
|
- key: 'f953210b2d5276ffbf5a2bc01ef80f55', // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
|
- version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
|
- plugins: [''] // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
|
+ //申请好的Web端开发者Key,首次调用 load 时必填
|
|
|
+ key: 'f953210b2d5276ffbf5a2bc01ef80f55',
|
|
|
+ //指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
|
+ version: '2.0',
|
|
|
+ //需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
|
+ plugins: ['']
|
|
|
})
|
|
|
.then(AMap => {
|
|
|
this.map = new AMap.Map('container', {
|
|
|
//设置地图容器id
|
|
|
- viewMode: '3D', //是否为3D地图模式
|
|
|
- zoom: 13, //初始化地图级别
|
|
|
- center: [112.976376, 28.195318] //初始化地图中心点位置
|
|
|
+ //是否为3D地图模式
|
|
|
+ viewMode: '3D',
|
|
|
+ //初始化地图级别
|
|
|
+ zoom: 13,
|
|
|
+ //初始化地图中心点位置
|
|
|
+ center: [112.976376, 28.195318]
|
|
|
})
|
|
|
})
|
|
|
.catch(e => {
|
|
@@ -322,8 +330,10 @@
|
|
|
resizeEnable: true
|
|
|
});
|
|
|
map.plugin("AMap.DragRoute", function () {
|
|
|
- route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE); //构造拖拽导航类
|
|
|
- route.search(); //查询导航路径并开启拖拽导航
|
|
|
+ //构造拖拽导航类
|
|
|
+ route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE);
|
|
|
+ //查询导航路径并开启拖拽导航
|
|
|
+ route.search();
|
|
|
});
|
|
|
},
|
|
|
//图表属性赋值
|
|
@@ -342,23 +352,35 @@
|
|
|
xAxis: {
|
|
|
data: this.xData
|
|
|
},
|
|
|
- legend: { // 图例
|
|
|
+ //图例
|
|
|
+ legend: {
|
|
|
data: [],
|
|
|
// bottom: "0%"
|
|
|
},
|
|
|
yAxis: {},
|
|
|
- dataZoom: [ //加上dataZoom可实现缩放
|
|
|
- {
|
|
|
- type: 'slider', //x轴
|
|
|
+ //加上dataZoom可实现缩放
|
|
|
+ dataZoom: [{
|
|
|
+ //x轴
|
|
|
+ type: 'slider',
|
|
|
xAxisIndex: 0,
|
|
|
|
|
|
},
|
|
|
{
|
|
|
- type: 'inside', //x轴
|
|
|
+ //x轴
|
|
|
+ type: 'inside',
|
|
|
xAxisIndex: 0,
|
|
|
- zoomOnMouseWheel: 'true', //如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。'shift':表示按住 shift 和鼠标滚轮能触发缩放。'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
|
|
|
+ /**
|
|
|
+ * 如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。
|
|
|
+ * 'shift':表示按住 shift和鼠标滚轮能触发缩放。
|
|
|
+ * 'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
|
|
|
+ */
|
|
|
+ zoomOnMouseWheel: 'true',
|
|
|
},
|
|
|
],
|
|
|
+ /**
|
|
|
+ * series中的参数:
|
|
|
+ * smooth:是否曲线,showSymbol:是否显示数据和数据点
|
|
|
+ */
|
|
|
series: [],
|
|
|
}
|
|
|
},
|