echarts 隐藏图例时,希望轴单位也自动隐藏

jckbn6z7  于 2022-11-02  发布在  Echarts
关注(0)|答案(5)|浏览(297)

Version

5.3.2

  • No response*

Steps to Reproduce

点击图例隐藏图表,轴单位未隐藏

Current Behavior

隐藏图例的时候,轴的单位未自动隐藏

Expected Behavior

期望隐藏图例的时候,轴的单位也隐藏

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

  • No response*
uxhixvfz

uxhixvfz1#

I'm sorry to close this issue for it lacks the necessary title. Please providea descriptive and as concise as possible title to describe your problems or requestsand then the maintainers or I will reopen this issue.

Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.

A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.

Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.

7uzetpgm

7uzetpgm2#

@YXYCZXY It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

When hiding the legend, want the axis units to also be automatically hidden

BODY

Version

5.3.2

  • No response*

Steps to Reproduce

Click the legend to hide the chart, the axis units are not hidden

Current Behavior

When you hide a legend, the units of the axis are not automatically hidden

Expected Behavior

When you expect to hide the legend, the units of the axis are also hidden

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

  • No response*
jc3wubiy

jc3wubiy3#

可以使用legendselected事件去操控你的option

gwo2fgha

gwo2fgha4#

使用legendselected 可以去烧烤你的选项

这个我知道这样的确可以解决,但是echarts自带的隐藏图例的时候可以把对应轴的label给隐藏,那为什么不也隐藏轴的单位呢?
我觉得这个是一个bug

4uqofj5v

4uqofj5v5#

使用legendselected 可以去烧烤你的选项

这个我知道这样的确可以解决,但是echarts自带的隐藏图例的时候可以把对应轴的label给隐藏,那为什么不也隐藏轴的单位呢? 我觉得这个是一个bug

这个是看个人需求的吧,有的需求会要求显示y轴的名称,我们在制作图表的时候是需要根据自己的需求封装的

相关问题