echartDemo var option = { title :{ text: '人员活跃度图表' }, tooltip : { trigger: 'axis' }, legend: { data:['活跃度'] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, magicType
var option = { title :{ text: '人员活跃度图表' }, tooltip : { trigger: 'axis' }, legend: { data:['活跃度'] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, magicType : {show: true, type: ['line', 'bar']}, restore : {show: true}, saveAsImage : {show: true} } }, calculable : true, xAxis : [ { type : 'category', data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'] } ], yAxis : [ { type : 'value', splitArea : {show : true} } ], series : [ { name:'活跃度', type:'bar', data:[2, 4, 7, 23, 26, 76, 135, 162, 32, 20, 64, 33] } ] }; var myChart = echarts.init(document.getElementById('userActivenessEcharts')); myChart.setOption(option); }; //需要引入echeart的js //id:userActivenessEcharts是div的ID近一个月人员活跃度图表.png