提交 72ec3796 编写于 作者: K__light's avatar K__light

奖牌地图页面

上级 c61f50cb
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../../../:\Users\K.night\IdeaProjects\demo\.idea/dataSources/
/dataSources.local.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
<component name="ArtifactManager">
<artifact type="war" name="demo:war">
<output-path>$PROJECT_DIR$/target</output-path>
<properties id="maven-jee-properties">
<options>
<module>demo</module>
<packaging>war</packaging>
</options>
</properties>
<root id="archive" name="demo-1.0-SNAPSHOT.war">
<element id="artifact" artifact-name="demo:war exploded" />
</root>
</artifact>
</component>
\ No newline at end of file
<component name="ArtifactManager">
<artifact type="exploded-war" name="demo:war exploded">
<output-path>$PROJECT_DIR$/target/demo-1.0-SNAPSHOT</output-path>
<properties id="maven-jee-properties">
<options>
<exploded>true</exploded>
<module>demo</module>
<packaging>war</packaging>
</options>
</properties>
<root id="root">
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
<element id="module-output" name="demo" />
</element>
</element>
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/target/demo-1.0-SNAPSHOT/META-INF/MANIFEST.MF" />
</element>
<element id="javaee-facet-resources" facet="demo/web/Web" />
</root>
</artifact>
</component>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="demo" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="demo" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: javax:javaee-web-api:8.0.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/javaee-web-api/8.0.1/javaee-web-api-8.0.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/javaee-web-api/8.0.1/javaee-web-api-8.0.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/javaee-web-api/8.0.1/javaee-web-api-8.0.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apiguardian:apiguardian-api:1.1.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.6.2/junit-jupiter-api-5.6.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.6.2/junit-jupiter-engine-5.6.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.junit.platform:junit-platform-commons:1.6.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.6.2/junit-platform-commons-1.6.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.junit.platform:junit-platform-engine:1.6.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.6.2/junit-platform-engine-1.6.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.opentest4j:opentest4j:1.2.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" project-jdk-name="16" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/demo.iml" filepath="$PROJECT_DIR$/demo.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebContextManager">
<option name="state">
<map>
<entry key="file://$PROJECT_DIR$/src/main/webapp/index.jsp" value="file://$PROJECT_DIR$/src/main/webapp" />
</map>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping>
<factory-entry name="default" />
</datasource-mapping>
<naming-strategy-map />
<deploymentDescriptor name="persistence.xml" url="file://$MODULE_DIR$/src/main/resources/META-INF/persistence.xml" />
</configuration>
</facet>
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax:javaee-web-api:8.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>1.0-SNAPSHOT</version>
<name>demo</name>
<packaging>war</packaging>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<junit.version>5.6.2</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>8.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.0</version>
</plugin> </plugins>
</build>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all">
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
version="2.2">
<persistence-unit name="default">
</persistence-unit>
</persistence>
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.3" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">
</faces-config>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
</web-app>
\ No newline at end of file
此差异已折叠。
<%--
Created by IntelliJ IDEA.
User: K.night
Date: 2022/3/21
Time: 20:27
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<a href="medalschart.html">奖牌总榜</a>
<a href="medalMap.jsp">奖牌地图</a>
</body>
</html>
此差异已折叠。
<%--
Created by IntelliJ IDEA.
User: K.night
Date: 2022/3/23
Time: 13:49
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>奖牌地图</title>
<script src="/echarts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.1/dist/echarts.js"></script>
<script src="https://www.isqqw.com/dep/echarts/map/js/world.js"></script>
</head>
<body>
<div id="main" style="width: 1000px;height:750px;"></div>
<script>
var myChart = echarts.init(document.getElementById('main'));
option = {
backgroundColor: '#ffffff',
title: {
subtext: '冬奥奖牌地图',
left: 'center',
top: 'top'
},
tooltip: {
trigger: 'item',
formatter: function (params) {
return '<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'
+ params.data.cname
+ '</div>'
+ '总数:' + params.value
+ "<div></div>"
+ '金牌:' + params.data.gold
+ "<div></div>"
+ '银牌:' + params.data.silver
+ "<div></div>"
+ '铜牌:' + params.data.bronze;
}
},
visualMap: {
pieces: [
{min:21},
{min:16,max:20},
{min:11,max:15},
{min:6,max:10},
{min:0,max:5}
],
text:['>20','0'],
splitNumber: 5,
realtime: false,
calculable: false,
color: ['#02a7f0', '#4ec2f5', '#b3e0fb', '#a7e0fa', '#ccedfc']
},
series: [
{
name: '冬奥奖牌地图',
type: 'map',
mapType: 'world',
roam: false,
itemStyle:{
emphasis:{
itemStyle: {
// 高亮时点的颜色。
color: '#971616'
},
label:{show:true}
}
},
data:[
{name: 'Australia', cname:'澳大利亚',value: 4, gold:1 ,silver: 2, bronze: 1},
{name: 'Austria', cname:'奥地利',value: 18, gold:7 ,silver: 7, bronze: 4},
{name: 'Belgium', cname:'比利时',value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Belarus',cname:'白俄罗斯', value: 2, gold:0 ,silver: 2, bronze: 0},
{name: 'Canada', cname:'加拿大', value: 26, gold:4 ,silver: 8, bronze: 14},
{name: 'Switzerland', cname:'瑞士',value: 14, gold:7 ,silver: 2, bronze: 5},
{name: 'China', cname:'中国',value: 15,gold:9 ,silver: 4, bronze: 2},
{name: 'Czech Republic', cname:'捷克',value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Germany',cname:'德国', value: 27, gold:12 ,silver: 10, bronze: 5},
{name: 'Spain', cname:'西班牙',value: 1, gold:0 ,silver: 1, bronze: 0},
{name: 'Estonia', cname:'爱沙尼亚',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Finland', cname:'芬兰',value: 8, gold:2 ,silver: 2, bronze: 4},
{name: 'France',cname:'法国', value: 14, gold:5 ,silver: 7, bronze: 2},
{name: 'United Kingdom', cname:'英国',value: 2, gold:1 ,silver: 1, bronze: 0},
{name: 'United States of America', cname:'美国',value: 25, gold:8 ,silver: 10, bronze: 7},
{name: 'Hungary', cname:'匈牙利',value: 3, gold:1 ,silver: 0, bronze: 2},
{name: 'Italy', cname:'意大利',value: 17, gold:2 ,silver: 7, bronze: 8},
{name: 'Japan', cname:'日本',value: 18, gold:3 ,silver: 6, bronze: 9},
{name: 'South Korea', cname:'韩国',value: 9, gold:2 ,silver: 5, bronze: 2},
{name: 'Latvia', cname:'拉脱维亚',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Netherlands', cname:'荷兰',value: 17, gold:8 ,silver: 5, bronze: 4},
{name: 'Norway', cname:'挪威',value: 37, gold:16 ,silver: 8, bronze: 13},
{name: 'New Zealand', cname:'新西兰',value: 3, gold:2 ,silver: 1, bronze: 0},
{name: 'Poland', cname:'波兰',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Russia', cname:'俄罗斯奥运队',value: 32, gold:6 ,silver: 12, bronze: 14},
{name: 'Slovakia',cname:'斯洛伐克', value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Slovenia',cname:'斯洛文尼亚', value: 7, gold:2 ,silver: 3, bronze: 2},
{name: 'Sweden', cname:'瑞典',value: 18, gold:8 ,silver: 5, bronze: 5},
{name: 'Ukraine', cname:'乌克兰',value: 1, gold:0 ,silver: 1, bronze: 0},
]
}
]
};
myChart.setOption(option);
</script>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all">
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
version="2.2">
<persistence-unit name="default">
</persistence-unit>
</persistence>
Manifest-Version: 1.0
Created-By: IntelliJ IDEA
Built-By: K.night
Build-Jdk: 16.0.2
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all">
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
version="2.2">
<persistence-unit name="default">
</persistence-unit>
</persistence>
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.3" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">
</faces-config>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
</web-app>
\ No newline at end of file
此差异已折叠。
<%--
Created by IntelliJ IDEA.
User: K.night
Date: 2022/3/21
Time: 20:27
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<a href="medalschart.html">奖牌总榜</a>
<a href="medalMap.jsp">奖牌地图</a>
</body>
</html>
<%--
Created by IntelliJ IDEA.
User: K.night
Date: 2022/3/23
Time: 13:49
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>奖牌地图</title>
<script src="/echarts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.1/dist/echarts.js"></script>
<script src="https://www.isqqw.com/dep/echarts/map/js/world.js"></script>
</head>
<body>
<div id="main" style="width: 1000px;height:750px;"></div>
<script>
var myChart = echarts.init(document.getElementById('main'));
option = {
backgroundColor: '#ffffff',
title: {
subtext: '冬奥奖牌地图',
left: 'center',
top: 'top'
},
tooltip: {
trigger: 'item',
formatter: function (params) {
return '<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">'
+ params.data.cname
+ '</div>'
+ '总数:' + params.value
+ "<div></div>"
+ '金牌:' + params.data.gold
+ "<div></div>"
+ '银牌:' + params.data.silver
+ "<div></div>"
+ '铜牌:' + params.data.bronze;
}
},
visualMap: {
pieces: [
{min:21},
{min:16,max:20},
{min:11,max:15},
{min:6,max:10},
{min:0,max:5}
],
text:['>20','0'],
splitNumber: 5,
realtime: false,
calculable: false,
color: ['#02a7f0', '#4ec2f5', '#b3e0fb', '#a7e0fa', '#ccedfc']
},
series: [
{
name: '冬奥奖牌地图',
type: 'map',
mapType: 'world',
roam: false,
itemStyle:{
emphasis:{
itemStyle: {
// 高亮时点的颜色。
color: '#971616'
},
label:{show:true}
}
},
data:[
{name: 'Australia', cname:'澳大利亚',value: 4, gold:1 ,silver: 2, bronze: 1},
{name: 'Austria', cname:'奥地利',value: 18, gold:7 ,silver: 7, bronze: 4},
{name: 'Belgium', cname:'比利时',value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Belarus',cname:'白俄罗斯', value: 2, gold:0 ,silver: 2, bronze: 0},
{name: 'Canada', cname:'加拿大', value: 26, gold:4 ,silver: 8, bronze: 14},
{name: 'Switzerland', cname:'瑞士',value: 14, gold:7 ,silver: 2, bronze: 5},
{name: 'China', cname:'中国',value: 15,gold:9 ,silver: 4, bronze: 2},
{name: 'Czech Republic', cname:'捷克',value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Germany',cname:'德国', value: 27, gold:12 ,silver: 10, bronze: 5},
{name: 'Spain', cname:'西班牙',value: 1, gold:0 ,silver: 1, bronze: 0},
{name: 'Estonia', cname:'爱沙尼亚',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Finland', cname:'芬兰',value: 8, gold:2 ,silver: 2, bronze: 4},
{name: 'France',cname:'法国', value: 14, gold:5 ,silver: 7, bronze: 2},
{name: 'United Kingdom', cname:'英国',value: 2, gold:1 ,silver: 1, bronze: 0},
{name: 'United States of America', cname:'美国',value: 25, gold:8 ,silver: 10, bronze: 7},
{name: 'Hungary', cname:'匈牙利',value: 3, gold:1 ,silver: 0, bronze: 2},
{name: 'Italy', cname:'意大利',value: 17, gold:2 ,silver: 7, bronze: 8},
{name: 'Japan', cname:'日本',value: 18, gold:3 ,silver: 6, bronze: 9},
{name: 'South Korea', cname:'韩国',value: 9, gold:2 ,silver: 5, bronze: 2},
{name: 'Latvia', cname:'拉脱维亚',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Netherlands', cname:'荷兰',value: 17, gold:8 ,silver: 5, bronze: 4},
{name: 'Norway', cname:'挪威',value: 37, gold:16 ,silver: 8, bronze: 13},
{name: 'New Zealand', cname:'新西兰',value: 3, gold:2 ,silver: 1, bronze: 0},
{name: 'Poland', cname:'波兰',value: 1, gold:0 ,silver: 0, bronze: 1},
{name: 'Russia', cname:'俄罗斯奥运队',value: 32, gold:6 ,silver: 12, bronze: 14},
{name: 'Slovakia',cname:'斯洛伐克', value: 2, gold:1 ,silver: 0, bronze: 1},
{name: 'Slovenia',cname:'斯洛文尼亚', value: 7, gold:2 ,silver: 3, bronze: 2},
{name: 'Sweden', cname:'瑞典',value: 18, gold:8 ,silver: 5, bronze: 5},
{name: 'Ukraine', cname:'乌克兰',value: 1, gold:0 ,silver: 1, bronze: 0},
]
}
]
};
myChart.setOption(option);
</script>
</body>
</html>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册