New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Legend Design #80
Comments
I think this could go well with generalizing the function for creating the legend, too! Right now I have a hack in the ChoroplethViz class that styles the legend symbols as rounded squares instead of circles. Are you thinking of inline CSS with Jupyter or defining more style components in viz.py? I'm happy to work on this a bit. |
Yes, that would be excellent @akacarlyann. There's lots of inspiration to take for great design - are you confident in the design direction you'd like to take, or would you prefer to start with some suggestions on this thread? As far as how to compile the CSS - if we're going to make the stylesheet bigger, I'd think of breaking it out into its own Alternatively, if there isn't much more css, we can just inline all the css into |
I like those. Other ideas from the Mapbox CSS library, especially for continuous scales: |
Apologies for hijacking, didn't want to create another issue on a related topic... Background: one of my use cases involves dropping a polygon on the map from a single geojson feature and filling in the enclosed area. I currently (mis)use a Question: would there be any interest in having a way to hide the legend? I've a few ideas, the simplest being a boolean Thanks! |
I'm in favor of a |
@bchowTWC I like that idea too! In the meantime, if you need a quick hack to hide the legend, you can override the legend block at the top of your choropleth HTML template (this is what is done for heatmaps currently):
|
@ryanbaumann I'm thinking of moving creation of the legend div into the legend creation function.
and removing |
Work in progress at #100 :) |
Agree with that approach @akacarlyann - generate the div in the javascript function instead of using more CSS magic to conditionally show/hide the legend |
For next steps on this, I think the best things would be:
|
Closed in #100 - let's open a new issue to track improvements @akacarlyann |
The current default legend is very basic - we should improve the design with a bit of CSS magic.
The text was updated successfully, but these errors were encountered: