-
Notifications
You must be signed in to change notification settings - Fork 63
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
Legend API #693
Comments
About the Legend API, why not keyword args instead of a dict? That way we can still pass a dict as |
We are following the same structure in this class as in the rest of viz classes. For example, this is a layer using all the classes: Map(
Layer(
Source('populated_places'),
style=Style('color: blue'),
popup=Popup({
'hover': '$name',
'click': '$pop_max'
}),
legend=Legend({
'type': 'color-category',
'prop': 'color'
})
)
) But the point is that the sugar API does not need the class instantiation so you can do: Map(
Layer(
'populated_places',
style='color: blue',
popup={
'hover': '$name',
'click': '$pop_max'
},
legend={
'type': 'color-category',
'prop': 'color'
}
)
) Since this is the simplest API, it will be most used one, and in this case, it is not possible to use args as params. |
👍 Makes sense |
Closed via #712 |
Types:
Properties: 'color', 'strokeColor'
The type of the legend could be different for each geometry type:
The text was updated successfully, but these errors were encountered: