You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are mutiple charts on the page, however, some of them have no data. We need to hide or disable those charts with no data.
What does the proposed API look like?
Would be extremely useful to have in options.series to hide or show specific series WITH series.visible = true/false. For example, we have 5 series, but we don't want to show one of them.
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 to our mailing list.
In our case, we are providing dataset and encode to multiple series and we need to be able to show/hide specific series, but keep all hidden series configurations, parameters, encode etc.
Reacted by fatemeh, Thomas THIMOTHEE, blankster and Alon Rosenfeld
@Rushan4eg According to ECharts's mechanism, the suggested way to do this is to pass the series to display to setOption(option, true), you may keep a variabled of all series and filter each time which ones to display.
I would like to have an option to define an invisible series element.
Like this
series: [{type:'hidden', data: [0,0] }]
or
series: [{type:'line', show: false }]
This would allow to hide certain data point from the graph.
For example legend component can be displayed for item that is not visible in graph.
If I understand it correctly, it is required that each legend item has at least one corresponding element in series.
Reacted by Ivan Germanov, Sergey Fedorov, O. Villani, Robert-Laverick, 희희호호, Jakub Tomek, Yochyo, Dzhanavapp, demoprazol, Bear4 and 15 more
Are there any updates to this issue ? Would really be awesome to be able to disable an entry in the series by default ( while the user can enable them via the legend if they wish to )
The exact api and the behavior would be like this https://stackoverflow.com/a/16319869
Also, is there API to do this like series.hide() or series.show()? I'd like to reverse the behaviour when user clicks on the legend item. Currently user click a legend item, then the series hide. But I'd like to change to show this series only and hide other series.
Reacted by Dzmitry Barkouski, siyuhong, Boston Vanseghi, Timothy Cuenat, Michaël Deschoolmeester, Mari, Tim Roberts, Dominic Bou-Samra, weiwei-huang and heleg
Activity
echarts-bot commentedon Aug 23, 2021
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 to our mailing list.
Have a nice day! 🍵
100pah commentedon Aug 23, 2021
If the original requirement is:
If there is no data, the series will not be displayed automatically.
Rushan4eg commentedon Aug 23, 2021
Hey!
In our case, we are providing dataset and encode to multiple series and we need to be able to show/hide specific series, but keep all hidden series configurations, parameters, encode etc.
Ovilia commentedon Aug 30, 2021
@Rushan4eg According to ECharts's mechanism, the suggested way to do this is to pass the series to display to
setOption(option, true), you may keep a variabled of all series and filter each time which ones to display.Johnz86 commentedon Dec 7, 2021
I would like to have an option to define an invisible series element.
Like this
or
This would allow to hide certain data point from the graph.
For example legend component can be displayed for item that is not visible in graph.
If I understand it correctly, it is required that each legend item has at least one corresponding element in series.
ahmednofal commentedon Jan 23, 2022
Are there any updates to this issue ? Would really be awesome to be able to disable an entry in the series by default ( while the user can enable them via the legend if they wish to )
The exact api and the behavior would be like this https://stackoverflow.com/a/16319869
bambooom commentedon Apr 20, 2022
Also want to know any updates on this issue? I need the option to show or hide some series just like in Highcharts example: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-visible/
Also, is there API to do this like
series.hide()orseries.show()? I'd like to reverse the behaviour when user clicks on the legend item. Currently user click a legend item, then the series hide. But I'd like to change to show this series only and hide other series.21 remaining items
Ovilia commentedon Jan 31, 2024
This should be a useful feature. If anyone wants to make a pull request, please leave a comment.
scopingGS commentedon Feb 13, 2024
+1
bvanseg commentedon Mar 7, 2024
+1
liuyug commentedon Apr 30, 2024
+1
siyuhong commentedon May 22, 2024
+1
Paradiesvogel7 commentedon Jun 7, 2024
+1
AlixH commentedon Sep 9, 2024
Up
fix: removed series are still displayed
fix: removed series are still displayed
iamjavkhaa commentedon Dec 17, 2024
This worked for me.
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",