<% @ 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">
<HTML>
<Head>
<Base href = "<% = basepath %>">
<Title> echarts demo </title>
<Meta http-equiv = "Pragma" content = "no-Cache">
<Meta http-equiv = "cache-control" content = "no-Cache">
<Meta http-equiv = "expires" content = "0">
<SCRIPT type = "text/JavaScript">
VaR option = {
Tooltip :{
Trigger: 'axis'
},
Legend :{
Data: ['evaporation ', 'precipitation']
},
Toolbox :{
Show: True,
Feature :{
MARK: {Show: true },
Magictype: {Show: True, type: ['line', 'bar']},
Restore: {Show: true },
Saveasimage: {Show: true}
}
},
Calculable: True,
Xaxis :[
{
Type: 'category ',
Data: ['August 11', 'August 11', 'August 11', 'August 11', 'August 11', 'August 11', 'August 11', 'August 11 ', 'octoken', 'octoken', 'octoken']
}
],
Yaxis :[
{
Type: 'value ',
Splitarea: {Show: true}
}
],
Series :[
{
Name: 'evaporation ',
Type: 'bar ',
Data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4]
},
{
Name: 'precipitation ',
Type: 'line ',
Data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0]
}
]
}
</SCRIPT>
</Head>
<Body>
<Div id = "Main" style = "height: 95%; Border: 1px solid # CCC; padding: 10px;"> </div>
</Body>
<SCRIPT src = "<% = basepath %> s_front frame/echarts-2.0.4/build/echarts-plain.js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
VaR MyChart = echarts. INIT (document. getelementbyid ('main '));
MyChart. setoption (option );
</SCRIPT>
</Html>
Echarts helloword demo