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

tooltip.formatter 回调函数 传入的param参数 color颜色不对 #12369

Closed
zl7261 opened this issue Apr 2, 2020 · 4 comments
Closed

tooltip.formatter 回调函数 传入的param参数 color颜色不对 #12369

zl7261 opened this issue Apr 2, 2020 · 4 comments
Labels
enhancement stale Inactive for a long time. Will be closed in 7 days.
Milestone

Comments

@zl7261
Copy link

zl7261 commented Apr 2, 2020

Version

4.6.0

Reproduction link

https://gallery.echartsjs.com/editor.html?c=xdAVdxqNMj&v=2

Steps to reproduce

emphasis会自动高亮了series Data的颜色

导致tooltip传入的param color属性是 高亮之前的属性

在默认启用emphasis的情况下,应该是传入高亮后的color值吧?

导致我有个自定义tooltip的需求找到当前series对应的颜色没办法准确实现

What is expected?

tooltip 回调函数传入的 param.color 为emphasis高亮之前的颜色
在这个例子里面,param.color取到高亮后的颜色, #0195ff

What is actually happening?

tooltip 回调函数传入的 param.color 为emphasis高亮之后的颜色
在这个例子里面,param.color为高亮前颜色 #0188fb

需求如下,可以看到高亮后的seriesData和param.color不是同一个颜色,
image

@echarts-bot
Copy link

echarts-bot bot commented Apr 2, 2020

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Apr 2, 2020
@100pah 100pah added enhancement and removed waiting-for: community pending We are not sure about whether this is a bug/new feature. bug labels Apr 2, 2020
@100pah 100pah added this to the 5.0.0 milestone Apr 2, 2020
@100pah
Copy link
Member

100pah commented Apr 2, 2020

In the current version of echarts, the highlighted color can only be calculated manually by:

var normalColor = '#0188fb';
var emphasisColor = echarts.color.lift(normalColor, -0.1);

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

@github-actions github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Jun 19, 2022
@github-actions
Copy link
Contributor

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants