Home > front end >  Why is my echarts China map just shows the spratly islands?
Why is my echarts China map just shows the spratly islands?

Time:11-29

O great god answer!!!!!!

 & lt; ! DOCTYPE html> 

<meta charset="UTF-8">
Document

<script SRC="https://bbs.csdn.net/topics/js/china.js" & gt; </script>
<script SRC="https://bbs.csdn.net/topics/js/echarts.min.js" & gt; </script>
<script SRC="https://bbs.csdn.net/topics/js/jquery-1.11.1.min.js" & gt; </script>
<body>


//the provinces list
Var dataMap=[{name: 'Beijing' value: 15}, {name: 'tianjin' value: 18}, {name: "Shanghai", the value: 15},
{name: chongqing, value: 55}, {name: 'hebei' value: 88}, {name: henan, value: 152}, {name: "yunnan", value: 154},
{name: liaoning, value: 1}, {name: heilongjiang, value: 57}, {name: hunan, value: 188}, {name: 'anhui' value: 45},
{name: shandong, value: 78}, {name: xinjiang, value: 44}, {name: jiangsu, value: 12}, {name: zhejiang, value: 63},
{name: 'jiangxi' value: 144}, {name: hubei, value: 111}, {name: 'in guangxi, value: 32}, {name:' gansu, value: 21},
{name: shanxi, value: 92}, {name: Inner Mongolia, value: 222}, {name: "shaanxi, value: 77}, {name: 'jilin, value: 24},
{name: fujian, value: 151}, {name: "guizhou, value: 17}, {name: guangdong, value: 66}, {name: 'qinghai' value: 55},
{name: Tibet, value: 44}, {name: 'sichuan' value: 33}, {name: 'in ningxia, value: 22}, {name:' hainan 'value: 11},
{name: "Taiwan", the value: 10}, {name: "Hong Kong", value: 17}, {name: 'macau, value: 18}]

Var option={
Tooltip: {
The formatter: function (params) {
Var info='& lt; P style="font - size: 10 px" & gt; '+ params. Name
+ '& lt;/p>

'
Return the info;
},
FontSize: "12 px",
BackgroundColor: "rgba (55,55,55,0.8),//prompt label background color
TextStyle: {color: "# FFF"},
//tips label font color/* triggerOn: 'click', */
Enterable: true
},

Series: [
{
Name: 'China'
Type: 'map',
MapType: 'China',

Label: {
Normal: {
Show: true,//show province tag
TextStyle: {8} fontSize:
},
Emphasis: {
Enterable: true,
//textStyle: {color: "# 800080"}
}
},
ItemStyle: {
Normal: {
BorderWidth: 15,//area border width
//borderColor: '# 009 fe8,//area border color
//areaColor: "# ffefd5",//area color
Color: function (params) {
If (params. Value & gt; 0 & amp; & Params. Value & lt; 100) {
Return "# FE8463";
Value & gt;} else if (params.=100 & amp; & Params. Value<{
=300)Return "# 27727 b";
}
Return "# 9 bca63";
}
},
Emphasis: {
BorderWidth: 5,
BorderColor: "# FF0000",
AreaColor: "# ffdead",
}
},



Data: dataMap
}
]

};
Var myChart=echarts. Init (document. GetElementById (" container "));
myChart.setOption(option);


</script>


Real-time data: & lt;/b>












Existing confirmed & lt;/b> Existing suspected & lt;/b> The existing severe & lt;/b>
54927 & lt;/td>
5206 & lt;/td>
11633 & lt;/td>
Yesterday - 1335 & lt;/td>
Yesterday + 1614 & lt;/td>
Yesterday - 231 & lt;/td>





The cumulative confirmed & lt;/td>
The cumulative cure & lt;/td>
The cumulative death & lt;/td>
75567 & lt;/td>
18401 & lt;/td>
2239 & lt;/td>
Yesterday + 892 & lt;/td>
Yesterday + 2109 & lt;/td>
Yesterday + 118 & lt;/td>



CodePudding user response:

CodePudding user response:

You this diagnosis, cure, the death toll how the color of the font is set, is not the default black, and how to implement
  • Related