用echarts画有两条线(柱)的折线(柱状)图
来源:互联网 发布:smartptt对讲软件下载 编辑:程序博客网 时间:2024/06/14 09:51
补登机后台的图表实现:
option = {title: { text: '过去七日交易额' }, tooltip : { trigger: 'axis' }, legend: { data:['交易额','交易量'] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true}, magicType : {show: true, type: ['line', 'bar']}, restore : {show: true}, saveAsImage : {show: true} } }, xAxis : [ { type : 'category', position: 'bottom', boundaryGap: true, axisLine : { // 轴线 show: true, lineStyle: { color: 'green', type: 'solid', width: 2 } }, axisTick : { // 轴标记 show:true, length: 10, lineStyle: { color: 'red', type: 'solid', width: 2 } }, axisLabel : { show:true, interval: 'auto', // {number}// rotate: 45, margin: 8, formatter: '周{value}', textStyle: { color: 'blue', fontFamily: 'sans-serif', fontSize: 15, fontStyle: 'italic', fontWeight: 'bold' } }, splitLine : { show:true, lineStyle: { color: '#483d8b', type: 'dashed', width: 1 } }, splitArea : { show: true, areaStyle:{ color:['rgba(144,238,144,0.3)','rgba(135,200,250,0.3)'] } }, data : [ '一','二','三','四','五','六','日' ] }, ], yAxis : [ { type : 'value', position: 'left', //min: 0, //max: 300, //splitNumber: 5, boundaryGap: [0,1], axisLine : { // 轴线 show: true, lineStyle: { color: 'red', type: 'dashed', width: 2 } }, axisTick : { // 轴标记 show:true, length: 20, lineStyle: { color: 'green', type: 'solid', width: 2 } }, axisLabel : { show:true, interval: 'auto', // {number}// rotate: -45, margin: 18, formatter: '{value}元', // Template formatter! textStyle: { color: '#1e90ff', fontFamily: 'verdana', fontSize: 10, fontStyle: 'normal', fontWeight: 'bold' } }, splitLine : { show:true, lineStyle: { color: '#483d8b', type: 'dotted', width: 2 } }, splitArea : { show: true, areaStyle:{ color:['rgba(205,92,92,0.3)','rgba(255,215,0,0.3)'] } } }, { type : 'value', splitNumber: 10, axisLabel : { formatter: function (value) { // Function formatter return value + '笔' } }, splitLine : { show: false } } ], series : [ { name: '交易额', type: 'bar', itemStyle:{ normal:{ color:"#1eb2b5" } }, data:[2000, 2300, 2400, 2500, 3100, 2100, 2800] }, { name: '交易量', type: 'line', yAxisIndex: 1, itemStyle:{ normal:{ color:"#9F79EE" } }, data: [20, 30, 40, 50, 50, 40, 70] }, ]}; myChart.setOption(option);
效果:
0 0
- 用echarts画有两条线(柱)的折线(柱状)图
- Echarts柱状折线图
- echarts柱状折线图数据量大,柱状图不显示问题解决办法.
- 仿echarts的折线图
- Echarts折线图的实例
- 用web chart控件实现折线,柱状,扇形图
- 用eCharts实现折线图的一些总结
- android 折线图、柱状…
- Echarts基础(二)柱、饼、折线图
- echarts折线图分段用不同颜色显示
- Echarts折线图
- echarts折线图
- echarts-折线图
- echarts折线图
- echarts绘制折线图
- ECharts学习-折线图
- echarts-单折线图
- echarts-多折线图
- 《软技能-代码之外的生存指南》-关于职业思考
- UploadDialog使用完整代码
- 利用Oracle DBMS_SCHEDULER调用shell脚本文件
- mysql的内连接、左外连接、右外连接、完全连接
- 网络编程(47)—— windows平台下的四种线程同步技术(一)
- 用echarts画有两条线(柱)的折线(柱状)图
- 复制Oracle数据库中文字符集AMERICAN_AMERICA.ZHS16GBK数据到目的库Oracle字符集AL32UTF8
- ABAP中TYPES与DATA、TYPE与LIKE 区别
- 一篇不错的v4l2入门文档 2
- Leetcode 188. Best Time to Buy and Sell Stock IV (Hard) (cpp)
- 使用eclipse制作war包方法 web项目打包到tomcat
- Slf4j-log4j12-1.6.1.jar包目录结构
- WebGL示例
- 无序子集合个数问题