如何将ECharts折线图和柱状图巧妙转换成长尾词?
- 内容介绍
- 文章标签
- 相关推荐
本文共计156个文字,预计阅读时间需要1分钟。
echartDemo变量定义如下:javascriptvar option={ title: { text: '员工活蹦乱跳图' }, tooltip: { trigger: 'axis' }, legend: { data: ['活蹦乱跳度'] }, toolbox: { show: true, feature: { mark: { show: true }, dataView: { show: true, readOnly: false } } }};
echartDemovar 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
本文共计156个文字,预计阅读时间需要1分钟。
echartDemo变量定义如下:javascriptvar option={ title: { text: '员工活蹦乱跳图' }, tooltip: { trigger: 'axis' }, legend: { data: ['活蹦乱跳度'] }, toolbox: { show: true, feature: { mark: { show: true }, dataView: { show: true, readOnly: false } } }};
echartDemovar 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

