apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.75k stars 19.62k forks source link

Echarts : Series bar , item style label formatter does not take html tags #9463

Closed Nagendra080389 closed 6 years ago

Nagendra080389 commented 6 years ago

General Questions

PLEASE MAKE SURE OF ALL THE FOLLOWING OPTIONS IN REQUIRED FIELDS ARE TICKED (with x)! Otherwise, the issue will not be answered. And think before you tick. :) 请确保以下每项都打上勾了!并且确保都做了这些事哦~ 这将大量简化我们的工作流程,使你的问题更快速得到解答。

In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:

Issue Type

Issue Details

{When using Echart's Series type as bar, the label formatter does not take html tags. My goal is to disable mouse action on bar and represent label on top as clickable, so I thought if I put a href on label formatter it would work, but this does not work}

Expected Behavior

{The label formatter should be able to identify html tags too.}

Current Behavior

{The label formatter does not identify html tags}

Online Example

THIS IS REQUIRED FOR ALL BUG REPORTS AND QUESTIONS!!! 如果是提问或报 bug 一定要提供这一项!

{https://jsfiddle.net/p2txk38v/5/}

series: [{ type: 'bar', cursor: 'default', itemStyle: { normal: { color: '#3b4563', label: { show: true, position: 'top', formatter: function(){ return '<a href="www.google.com"> Click Me</a>'; } } } }, data: ['2', '10'] }]

Topics

Anything Else We Need to Know

{DESCRIBE_HERE}

Environment

deqingli commented 6 years ago

It doesn't support HTML tags yet.

Nagendra080389 commented 6 years ago

@pissang @deqingli Is there a workaround way to make label formatter clickable?

aloneWang commented 4 years ago

这就关掉?