Skip to content
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

Add back legend subtypes #1443

Open
makella opened this issue Jan 6, 2020 · 3 comments
Open

Add back legend subtypes #1443

makella opened this issue Jan 6, 2020 · 3 comments

Comments

@makella
Copy link
Contributor

makella commented Jan 6, 2020

For discussion @elenatorro @Jesus89

Previously, we gave users the option to use legend subtypes and with the new refactor, that option no longer is available.

I think this is really useful for different map types, and gives users the same flexibility as they had before and is in the same category as allowing a user to use a different legend type completely (for example, using a color_continuous legend with a color_bins style).

Here is an example we can discuss where we are looking at continuous point data and where something like the color_continuous_polygon legend would provide a better representation of the continuous data:

Screen Shot 2020-01-06 at 2 46 00 PM

That is similar to what I did in this map (when we still had subtypes available):
Screen Shot 2019-12-23 at 1 36 55 PM

Since a user will already be working inside of the legend, I think we can add a parameter like type to define which legend subtype they want to use:

Layer(
    'temps',
    color_continuous_style('value'),
    legends=color_continuous_legend(
        type='polygon',
        title='Trees in San Francisco',
        description='Top 3 species',
        footer='Data: City of SF'
    )
)
@makella
Copy link
Contributor Author

makella commented Jan 6, 2020

related: #1444

@elenatorro
Copy link
Contributor

I like this idea of being able to change the legend type 👍

On one hand, I'd use a different way of identifying the legend type, cause in this case I think it's confusing to use a 'polygon' legend type in a point layer.

On the other hand, I know that this is what we're using as a layer type in Airship, and I don't know if we should keep using the same pattern for 'consistency'

@makella
Copy link
Contributor Author

makella commented Jan 7, 2020

@elenatorro good point! i'll do some looking around and think about different descriptive words for legends that isn't tied to geometry

@cmongut cmongut added this to the [1.1] Next milestone Jan 12, 2020
@cmongut cmongut added the triage label Jan 21, 2020
@Jesus89 Jesus89 removed the triage label Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants