Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE浏览器下graphic.style.font属性中使用em像素单位导致onclick方法失效 #11384

Closed
FuckAName opened this issue Oct 11, 2019 · 5 comments
Labels

Comments

@FuckAName
Copy link

This issue is not created by echarts-issue-helper and will be soon closed.

@FuckAName
Copy link
Author

FuckAName commented Oct 11, 2019

option = {
    graphic: {
        "type": "text",
        top: 10,
        "style": {
            "text": "Read Throughput",
            "fill": "#38a8ff",
            "font": "bolder 0.875em \"Microsoft Yahei\"",
            "textBaseline": null,
            "textVerticalAlign": null,
            "textFill": "#38a8ff"
        },
        onclick: function () {
            console.log("aaa");
        }
    },
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line'
        }
    ]
};

@FuckAName
Copy link
Author

What is expected?
IE浏览器下onclick方法正常使用

What is actually happening?
IE浏览器下onclick方法失效,大概定位了下,graphic style font属性一旦使用em就会出现此问题

@FuckAName
Copy link
Author

FuckAName commented Oct 11, 2019

image

如图,点击标题“Read”文字,无任何反应,IE版本见下图

image

@FuckAName FuckAName changed the title IE浏览器下graphic:style:font属性中使用em像素单位导致onclick方法失效 IE浏览器下graphic.style.font属性中使用em像素单位导致onclick方法失效 Oct 11, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Oct 12, 2019

em is not supported currently. There is a PR to support rem. @100pah @pissang Please help review that PR when you have time.
@FuckAName Could you consider using px instead of em?

@FuckAName
Copy link
Author

现在用px规避问题了,如果浏览器兼容性有差异,建议配置项手册进行说明
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants