Chart type, necessary Parameters! If the type is empty or unsupported, the series data is not displayed. The options are:
' Lines ' (line chart) | ' Bar ' (histogram) | ' Scatter ' (Scatter chart) | ' K ' (candlestick chart)
' Pie ' (pie chart) | ' Radar ' (Radar Chart) | ' Chord ' (chord chart) | ' Forces ' (force-oriented layout) | ' Map ' (maps)
Pie chart: ' Echarts/chart/pie '// load with a bar chart Bar module, load on demand, remember to change Pie
Bar Chart: ' Echarts/chart/bar '
<%@ page contenttype= "Text/html;charset=utf-8"%><%@ include file= "/web-inf/views/include/taglib.jsp"%> <%@ page language= "java" import= "java.util.*,java.lang.*" pageencoding= "UTF-8"%>//Path Configurationrequire.config ({paths: {echarts:' Http://echarts.baidu.com/build/dist ' } }); //Userequire ([' Echarts ', ' Echarts/chart/pie '//load bar module with bar chart, load on Demand ], function(EC) {//Initialize the Echarts chart based on the prepared Dom varMyChart = Ec.init (document.getElementById (' main '))); Option=Replace part//loading data for Echarts objectsmychart.setoption (option); } ); </script>Echarts Pie Chart Display template