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.

Is your feature request related to a problem? Please describe. I’d like to hide a bunch of series by their seriesName, however, the following technique has a slow execution: ["Series1", "Series2", "Series3"].forEach((series) => chart.hideSeries(series));

probably because it calls the this.ctx.update() method everytime.

Describe the solution you’d like I’d like to use a method called hideAllSeries(seriesArray), or an update of the current hideSeries, that takes an array of possible series currently rendered, and hide them programmatically.

Describe alternatives you’ve considered None.

Additional context None.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

3reactions
ericlighthofmanncommented, Jul 22, 2020

Seconding this. I have a chart with about 10 series and I would like to have one visible on page load. Looping through and calling hideSeries on each one causes my page load to take about 5 times longer with chart animations and annotations turned off.

2reactions
wederfabriciocommented, Dec 2, 2021

Hey guys! I got a workaround to this. In my case, works perfectly.

Before run a bunch of hideSeries or showSeries calls, you can do:

events: {
    legendClick: (chartContext, seriesIndex, config) => {
      const update = chartContext.update
      chartContext.update = () => {}

      // Your logic to show or hide a bunch of hide/showSeries

      chartContext.update = update
      chartContext.update()
    });
}

This will copy original update() function from Chart and replace for an empty arrow function temporarily. After execute your changes, you can restore and call original update() to see your changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can i hide all the Series in highcharts at a time
I want to hide all the series's at a time , till now i use $.each hide all the series one by one...
Read more >
Checkbox to show/hide all series - Highcharts
I would like to put a checkbox to the left of the text Hide/Show all series above the legends. How do I put...
Read more >
Hide/show all series in Oracle APEX Jet charts
hi folks anybody know how to show or hide ALL series at once on an Oracle JET chart, say a bar chart?
Read more >
Series and Segment Format > Hide/Show Series
Mekko Graphics allows you to hide series in your chart. APPLIES TO: ALL CHARTS. 1.Select the series you wish to hide. 2.Right click...
Read more >
Show and Hide a Series - DevExtreme - DevExpress
A series can be hidden initially. For this, assign false to the visible property of the object that configures the series. jQuery. JavaScript....
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