shanewds opened a new issue #8542: echarts保存图片显示模糊,如何解决?数据来源于后台返回的值. URL: https://github.com/apache/incubator-echarts/issues/8542 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ECharts</title> <!-- 引入 echarts.js --> <script src="js/echarts.js"></script> </head> <body> <!-- 为ECharts准备一个具备大小(宽高)的Dom --> <div id="main" style="width:500px;height:300px;"></div> <script type="text/javascript"> /* function myrefresh() { window.location.reload(); } setTimeout('myrefresh()',3000); //指定几秒刷新一次*/ // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); // 指定图表的配置项和数据 var option = { title : { text: '', subtext: '' }, tooltip : { trigger: 'axis' }, legend: { data:[''] }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, magicType : {show: true, type: [ 'bar']}, restore : {show: true}, saveAsImage : {show: true} } }, calculable : true, xAxis : [ { type : 'category', data : ['avg','28日','29日','30日','1日'] } ], yAxis : [ { type : 'value' } ], series : [ { name:'', type:'bar', data:[1520,699,1350,1805,2226], /* 显示数据到顶端*/ itemStyle: { normal: { lineStyle:{ color:'#EB3223' }, label: { show: true, textStyle: { fontWeight: 'bolder', fontSize: '12', fontFamily: '微软雅黑' }, position: 'top' }, color: function (params) { var colorList = [ '#B02318', '#305866', '#305866', '#305866', '#305866', '#305866', '#305866', '#305866', '#305866', '#305866', '#305866' ]; return colorList[params.dataIndex] } } }, markPoint : { data : [ ] }, markLine : { data : [ //{type : 'average', name: ''} ] } } ] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); </script> </body> </html> 图片显示如下: 
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
