Skip to content

Commit 2489db8

Browse files
author
luoxiao
committed
【fix】mapboxgl,leaflet图表微件范例bug修复 review by songym
1 parent 34ce27d commit 2489db8

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

examples/leaflet/widgets_chart_isvr.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,13 @@
180180
} else if (selectedIndex === 1) {
181181
chartOption = [{
182182
xAxis: {
183+
field: "NAME",
184+
name: "NAME"
185+
},
186+
yAxis: {
183187
field: "ADCLASS",
184-
name: "class"
185-
}
188+
name: "ADCLASS"
189+
},
186190
}];
187191
} else if (selectedIndex === 2) {
188192
chartOption = [{

examples/mapboxgl/widgets_chart_isvr.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@
201201
});
202202
}
203203
//切换数据集
204-
$('#rule').onchange = () =>{
205-
var selectedIndex = ($('#rule').get(0).selectedIndex);
206-
var url = $('#rule').val();
204+
$("#rule").change(function () {
205+
var selectedIndex = ($(this).get(0).selectedIndex);
206+
var url = $(this).val();
207207
var chartOption, serviceType, withCredentials;
208208
// 如果已上图,删除当前地图上的图层和数据集
209209
map.getLayer(resultLayer.id) && map.removeLayer(resultLayer.id) && map.removeSource(resultLayer.id);
@@ -281,7 +281,7 @@
281281
};
282282
barChart.onAdd(addDataToMap);
283283
barChart.updateData(datasets, chartOption);
284-
};
284+
});
285285
</script>
286286
</body>
287287

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy