question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add feature show/hide Series

See original GitHub issue

What problem does this feature solve?

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.

option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [150, 230, 224, 218, 135, 147, 260],
        visible: false,
        type: 'line'
    }]
};

Also, would be useful to have option to hide series if there is no data in the series.

series.displayWhenNoData= true/false

Waiting and ready to help!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:13
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
Johnz86commented, Dec 7, 2021

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.

2reactions
Rushan4egcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show/hide features on layer in OpenLayers?
Also, there should be only one question asked per question. – PolyGeo ♢. Feb 5, 2018 at 21:12. Add a comment ...
Read more >
Using the Show/Hide Features in InDesign - YouTube
This video is intended to serve as a supplement to the lecture in my PHO448 Self-Publishing for Photographers at Harrington College of ...
Read more >
Tableau 2021.2 New Feature: Show and Hide Everything!
It's pretty straightforward: click the drop-down menu of any element on a dashboard and choose: Add Show/Hide Button. A floating button will ...
Read more >
Feature Table Show/Hide Issue - Esri Community
Feature Table Show/Hide Issue ... I have a map on which I am loading a couple feature layers. Additionally, I am adding 2...
Read more >
Show/Hide - Help Center - FORM.COM Knowledge Base
Click Advanced features button on the form toolbar menu and select the Show/Hide from the dropdown. You can create the Show/Hide feature in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found