Echarts Home: http://echarts.baidu.com/index.html
Echarts-2.1.8:http://echarts.baidu.com/build/echarts-2.1.8.zip
Echarts Official Example: http://echarts.baidu.com/doc/example.html
Echarts Official API Document: Http://echarts.baidu.com/doc/doc.html
Echarts Series-Histogram (bar chart) Example 11, project structure
js folder: After downloading the echarts, decompression, such as the root directory after decompression is echarts-2.1.8, then to Echarts-2.1.8\doc\example\www path, the inside of the JS folder directly copied and pasted into the project Webroot root directory
echarts.jsp: Create a new echarts.jsp under the Webroot root directory
echarts.jsp
<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%><%string path = Request.getcontextpath () ; String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
After completing the above steps, the project is published to the server, the browser access to echarts.jsp (because this instance has not yet interacted with the background, just first to do a foreground usage introduction, so you can change the echart.jsp directly into echarts.html file, Put it with the JS folder in the same level directory, and then directly open echarts.html with the browser, you can see the following effect
There is a toolbox in the upper right corner of the picture, click the "Line chart Toggle" button, the effect is as follows
More chart style settings to view Echarts's official API documentation
Echarts Series-Histogram (bar chart) Example one