Home > front end >  Echarts introducing external js map file failed
Echarts introducing external js map file failed

Time:11-17

Made based on the map Echarts scatterplot (bubble chart), in the process on making USA. Download a include js file, want to introduce the following code, to achieve the goal of the map to display, this is I downloaded from the official Echarts map/js/China. Try js file, a map of China on a web page can display properly; But when I add the following code in China. The js changes for the USA. I found the js, web page can't display normally, requests of bigwigs doubt help, thank you very much!!!!!!
 & lt; ! DOCTYPE html> 

<meta charset="utf-8" & gt;
Map
<script SRC="https://bbs.csdn.net/topics/dist/echarts.js" & gt; </script>
<script SRC="https://bbs.csdn.net/topics/map/china.js" & gt; </script>
<style>
* {margin: 0; Padding: 0}
HTML, body {
width:100%;
height:100%;
}
# main {
Width: 800 px;
Height: 600 px;
Margin: 150 px auto;
Border: # 1 px solid DDD;
}
</style>

<body>


var myChart=echarts.init(document.getElementById('main'));

Var option={
Geo: {
The map: 'China',
},
};

myChart.setOption(option);
</script>


  • Related