apache / echarts

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

type scatter label do not show #14830

Closed DoubleCorner closed 1 year ago

DoubleCorner commented 3 years ago

Version

5.0.2

Steps to reproduce

I set the itemStyle = { normal: {opacity: 0}, emphasis: {opacity: 1} } and label = { normal: {show: false}, emphasis: {show: true} } of each scatter to make scatter show when highlighted by the function of dispatchAction({type: 'highlight'}).But only the scatter is displayed, and the label is not displayed.

What is expected?

the label is not displayed.

What is actually happening?

the label is displayed


ps: 4.9.0 is ok. But 5.0.2 is no ok. I try set label = { normal: {show: false}, emphasis: {show: true, opacity: 1} }. Then it works !!!

echarts-bot[bot] commented 3 years ago

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 it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

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 dev@echarts.apache.org. Please attach the issue link if it's a technical question.

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

Have a nice day! 🍵

pissang commented 3 years ago

I think it's because since 5.0 the default opacity of label follows the opacity of element in the normal state

DoubleCorner commented 3 years ago

OK...

DoubleCorner commented 3 years ago

I want to report other problem, that is the tooltip of type map.

option.tooltip = {
  trigger: 'item',
  confine: true,
  formatter: function () {
    const item = mapData[param.dataIndex];
      // TODO echarts 5 bug 会显示上次 tip
      // 没有数据则不展示 tooltip
      if (!item) return null;
  }
}

Tooltip will show last content. I hope is not displayed. tips: 4.9.0 is ok. image

pissang commented 3 years ago

Please open a new issue to report it

github-actions[bot] commented 1 year ago

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[bot] commented 1 year ago

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!