echarts-1.4.1 版本搭建集成手册
1. 在你的 web 工程 js 包下新建 echarts 文件夹,如下图所示。
2. 在你的 jsp 页面中只需引入以下 js 文件
<script language="javascript" src="<genesis:base/>/js/echarts/esl.js"></script>
<genesis:base/>代表你的工程名
3. 最重要就是你的 jsp 页面引入 echarts
<script type="text/javascript">
请求配置
require.config({
paths:{
echarts:'<genesis:base/>/js/echarts',
'echarts/chart/bar' :'<genesis:base/>/js/echarts/echarts-
map',
'echarts/chart/line': '<genesis:base/>/js/echarts/echarts-
map'
}
});
具体发送请求,按需配置
require(
[
'echarts',
'echarts/chart/bar',
'echarts/chart/line'
],
function(ec) {
- 1
- 2
- 3
- 4
- 5
前往页