echart在ie8下的bug
来源:互联网 发布:总决赛数据 编辑:程序博客网 时间:2024/06/16 22:59
echart在多个div上实例化后自己会有联系。标准的例子如下:
<div id='main' style="height: 500px;margin:50px; display:block"></div>//初始化 var option = { title: { text: "车辆费用统计图", x: "center", y: "top" }, tooltip: { trigger: 'item', //触发类型,默认数据触发,可选为:'item' | 'axis' formatter: "{a} <br/>{b} : {c} ({d}%)" //内容格式器:{string}(Template) | {Function},支持异步回调 }, legend: { orient: 'vertical', x: 'left', data: name1, legendHoverLink: true, }, toolbox: { show: true, feature: { mark: { show: true }, dataView: { show: true, readOnly: false }, magicType: { show: true, type: ['pie', 'funnel'], option: { funnel: { x: '25%', width: '50%', funnelAlign: 'left', max: 1548 } } }, restore: { show: true }, saveAsImage: { show: true } } }, calculable: true,//是否数据拖拽合并 series: [{ //clickable: true, name: '费用(元)', type: 'pie', minAngle: 5, radius: ['30%', '45%'],//'25%', //半径,支持绝对值(px)和百分比,百分比计算比,min(width, height) / 2 * 75%, 传数组实现环形图,[内半径,外半径] center: ['50%', '60%'],//圆心坐标,支持绝对值(px)和百分比,百分比计算min(width, height) * 50% data: vvv1, itemStyle: { normal: { label: { show: true, formatter: '{b} : {c} ({d}%)' }, labelLine: { show: true } } } }], }; require(['echarts', 'echarts/chart/pie', 'echarts/chart/line'], function (ec) { myChart = ec.init(document.getElementById('main'), 'macarons'); //var ecConfig = require('echarts/config'); //myChartPie.on(ecConfig.EVENT.CLICK, eConsole); myChart.setOption(option, true); });//切换视图 var option = { tooltip: { show: true }, title: { x: 'center', text: '车辆费用统计图', }, legend: { y: 'bottom', data: ['费用(元)'] }, toolbox: { show: true, feature: { mark: { show: true }, dataView: { show: true, readOnly: false }, magicType: { show: true, type: ['bar'] }, restore: { show: true }, saveAsImage: { show: true } } }, xAxis: [ { type: 'category', data: name1 } ], yAxis: [ { name: '费用(元)', type: 'value' } ], series: [{ name: '费用)', type: 'bar', data: value1, barWidth: 100,//固定柱子宽度 } ] };myChart.clear(); myChart.setOption(option);
如果想动态调整大小,可以
$(“#echart1”).width(widthHalf);
echart1.resize();
阅读全文
0 0
- echart在ie8下的bug
- IE8在XP下的一个Bug?
- jquery.MultiFile.js 在IE8下 的BUG
- jquery validate在ie8下的bug解决
- ie8下遍历字符串出现的bug
- 在IE8下的table tr使用toggle()无法生效的bug的解决方法
- 百度echart在ie下图表不显示的问题
- javascript下ie7,ie8的Date Bug的解决
- javascript下ie7,ie8的Date Bug的解决 .
- javascript下ie7,ie8的Date Bug的解决
- JSON2的JSON.stringify在IE8上的BUG
- jq的slideToggle()在ie8里遇到bug:下盒子的margin—top失效,margin-top塌陷解决方法
- BUG记录--Iconfont图标在IE8浏览器的兼容问题
- Echart在Openlayers的应用
- BHO在IE8下的调试
- BootStrap3 在IE8下的兼容性问题
- IE8关于Session的bug
- echart图表制作bug
- 项目中js文件修改后浏览器不能及时更新的解决办法
- IC设计笔记----记录我踩过的坑
- HTML 5 <input> required 属性
- CSS3常用功能的写法
- 欢迎使用CSDN-markdown编辑器
- echart在ie8下的bug
- python使用@property
- <MFC> 父窗口与子窗口切换在最前端
- thinkphp发送邮件
- python 学习----使用帮助文档
- 分布式与集群的区别
- dropzone.Js
- 简单绘制一个钟表
- SAP本地化-银企直连