Hiding the legend for a channel
See original GitHub issueIn vega-lite JSON, under encoding
I was able to do the following:
"opacity": {
"field": "positives",
"type": "quantitative",
"legend": false
}
The "legend": false
line suppressed the rendering of the opacity legend.
In altair, I tried specifying the following argument for .encode()
:
opacity = altair.Opacity('positives', legend=False)
This raised the error:
TraitError: The 'legend' trait of an Opacity instance must be a Legend or None, but a value of class 'bool' (i.e. False) was specified.
Any way to hide the legend for a channel in altair?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Show or hide a chart legend or data table - Microsoft Support
Select a chart and then select the plus sign to the top right. Point to Legend and select the arrow next to it....
Read more >Remove Legend in ggplot2 (3 Example Codes) - Statistics Globe
How to remove legends in ggplot2 - 3 R programming examples - Switch off one legend or hide all legends of plot -...
Read more >Tv Settings; Favorite; Show / Hide; Channel Label - Legend ...
Legend LE2622 Manual Online: tv settings, Favorite, Show / Hide, Channel Label. Added Or Deleted From Your List. Press Enter To Add Or...
Read more >Hiding items in highchart legend - Stack Overflow
If you want to hide the series from the legend when the chart is initialized, it is as you have written: series: {...
Read more >can we hide legend labels - Microsoft Power BI Community
Appreciate your Kudos !! Proud to be a Super User! !! Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In Altair 2.0, this can be done with
legend=None
.Altair doesn’t yet support explicit nulls, so now that they have meaning in Vega-Lite we will need to add that. I’d probably opt to introduce an
altair.null
object for cases like this when the user wants to be explicit (currentlyNone
tells Altair to leave that entry out of the schema, and there’s no easy way to change that behavior).