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.

Make it possible to hide data from a chart without unloading

See original GitHub issue

Is it possible to simply stop data from loading in the chart without actually unloading the data itself from the data object. I’m toying with a use case where related data could be included in CSV, but only displayed in the tooltip (for example, margins of error).

If it were possible to just stop the visual for a particular data id from loading without removing the data altogether (through unload) then I could access the data in the tooltip contents without referencing another source.

Does that make sense. So the feature I’m looking for is something like

hide({ids: ''}) 

instead of an

unload({ids: ''})

Is this currently possible, and I’m just missing it? I understand this may be an edge use case, but being able to pass in data and not load it into a chart would allow easier access to data for cases where someone wants to use and manipulate that data in non-chart elements.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
clement911commented, Nov 16, 2016

Thanks that worked for me too, however I can seem to find a way to access the hidden fields from the tooltip.contents callback. It seems that the data parameter only include non-hidden fields. Am I missing something?

1reaction
jasonlallycommented, Nov 20, 2014

No worries, thanks for putting me on the right track. I may have found a bug or it could be user error 😄

I have this right after I generate my chart

chart.hide(['MOE_Renter','MOE_Owner'],{withLegend: true});

And I get this:

screen shot 2014-11-19 at 4 20 03 pm

With this error and stacktrace in the debugger:

Uncaught TypeError: Cannot read property 'selectAll' of undefined c3.js:5696
c3_chart_fn.hide c3.js:5696
generateChart (index):1343
init (index):830
window.onload (index):805

I’m using the latest c3 0.4.3 release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hide some graphic elements, c3js, without unloading data
One easy solution is to use CSS display property for the chart svg elements like:- http://jsfiddle.net/chetanbh/j9vx0dmg/
Read more >
Show or hide a chart legend or data table - Microsoft Support
To hide the data table, uncheck the Data Table option.
Read more >
How to Hide a Series in an Excel Chart Data Table - YouTube
A question that has come up a few times during various training sessions on charts and dashboards is " Can I hide one...
Read more >
the C3 reference - C3.js | D3-based reusable chart library
In this case, polyfill is required in IE9 and IE10 because they do not ... it's possible to set for each data //format:...
Read more >
Chart - billboard.js API doc
Get and set axes of the data loaded in the chart. NOTE: If all data is related to one of the axes, the...
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