Incubator-echarts: echart 图表和字体模糊问题

Created on 23 Jun 2017  ·  15Comments  ·  Source: apache/incubator-echarts

One-line summary [问题简述]

echarts 在显示屏上不清晰

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

期望文字和图表都清晰

ECharts option [ECharts配置项]


http://gallery.echartsjs.com/editor.html?c=xBJp81juHx 配置如例

option ={
    title: {
        text: '米类月累(%)',
        subtext: '',
        left: 'center',
        padding: [140, 0],
        link: 'http://www.baidu.com'
    },
    backgroundColor: '',
    tooltip: {
        formatter: '<div style="text-align: center;">业务指标</div>{b} : {c}'
    },
    toolbox: {
        feature: {
            restore: {},
            saveAsImage: {}
        }
    },
    series: [{
        axisLine: {
            show: true,
            lineStyle: {
                color: [
                    [0.166, '#c23531'],
                    [0.5, '#EFC631'],
                    [0.835, '#63869e'],
                    [1, '#91c7ae']
                ],
                width: 20
            }
        },
        axisTick: {
            show: true
        },
        axisLabel: {
            distance: 6,
            textStyle: {
                color: 'auto'
            }
        },
        itemStyle: {
            normal: {
                color: 'auto'
            }
        },
        radius: '35%',
        pointer: {
            width: 10
        },
        title: {
            offsetCenter: [0, '90%'],
        },
        detail: {
            textStyle: {
                // fontWeight: 'bolder',
                fontSize: 23,
                color: 'black'
            },
            offsetCenter: [0, '58%'],
            formatter: '{value}万\n(5048人)'
        },
        min: 0,
        max: 120,
        name: '米类仪表盘',
        type: 'gauge',
        show: false,
        splitNumber: 12,

        data: [{
            value: '33',
            name: '月目标900吨,月累环比下降20%'
        }]
    }]
};

Other comments [其他信息]


echarts-1

Most helpful comment

@waitingHao 我这测试是有效的:左边模糊,右边清晰,右边加了下面的参数:

echarts.init(document.getElementById('gender1'), null, {devicePixelRatio: 2});

image

All 15 comments

无法复现

Chrome 59上的canvas问题。旧版没问题。

screen shot 2017-07-04 at 14 50 25
最新版沒問題吧

image

小图会有问题,大的话出现几率低。

确实小图容易出现

echarts.init(document.getElementById(id),'', {devicePixelRatio:2});这样的配置可以解决,设置像素比为2

我这测试无效 @webJing

@waitingHao 我这测试是有效的:左边模糊,右边清晰,右边加了下面的参数:

echarts.init(document.getElementById('gender1'), null, {devicePixelRatio: 2});

image

@tedpenk @webJing 生效了,非常感谢。

另外 在html中
<canvas id="index-chg-chart" width="200%" height="72px" style="width:100%; height: 36px;"></canvas>, 也能解决模糊问题

我再手机端 加上{devicePixelRatio: 2} 依然不清楚,请问什么原因啊?

@changbb 请问一下手机端解决没

@changbb 请问一下手机端解决没

我记得是html元素用svg替代canvas

@changbb 请问一下手机端解决没

我这里需要用到echarts里面的扇形图,svg好像无法替代

------------------ 原始邮件 ------------------
发件人: "changbb"notifications@github.com;
发送时间: 2019年5月20日(星期一) 下午3:51
收件人: "apache/incubator-echarts"incubator-echarts@noreply.github.com;
抄送: "胡启三 "879773877@qq.com;"Comment"comment@noreply.github.com;
主题: Re: [apache/incubator-echarts] echart 图表和字体模糊问题 (#6054)

@changbb 请问一下手机端解决没

我记得是html元素用svg替代canvas


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings