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

Style API #1345

Closed
15 of 20 tasks
elenatorro opened this issue Dec 12, 2019 · 2 comments
Closed
15 of 20 tasks

Style API #1345

elenatorro opened this issue Dec 12, 2019 · 2 comments

Comments

@elenatorro
Copy link
Contributor

elenatorro commented Dec 12, 2019

Epic #1343

Features

1. Helper-Like Parameters

  • Add style value parameter
  • Add style type parameter
    • Check valid types
Layer(
    'starbucks_points',
    style=Style(
        value='revenue',
        type='size_continuous'
    )
)

2. Legends-Like Parameters

These parameters are used by default in the by default generated Legend. If custom legends are provided along with any of these parameters, they'll be added as a Default Legend on top of the rest of the legends.

  • Add style title parameter
  • Add style description parameter
  • Add style footer parameter

3. Style-Property Parameters

  • Use style-property parameters
Layer(
    'table_name',
    style=Style(
        type='size_continuous',
        value='revenue',
        color='white',
        opacity=0.2,
        stroke_color='blue',
        size= [20, 80]
    )
)

4. Style Helpers

  • Create a style helper by type
    • size_continuous_style
    • color_continuous_style
    • color_bins_style
    • size_bins_style
    • color_category_style
    • size_category_style
    • animation_style
  •  When not using a Style helper, define the default legend to avoid showing, for example, 'color' as a description of the legend item
Layer(
    'table_name',
    size_continuous_style(
        'revenue',
        color='white',
        opacity=0.2,
        stroke_color='blue',
        size= [20, 80]
    )
)

5. Animation

  • Default animation
  • If animate is set, then a user will get a time-series widget by default.
  • If animate is set but the widget is overwritten, the animation will be present the custom widgets won't be animated

⚠️ 6. Docs!

This is an implicit task: update documentation

  • Guides
  • Reference
  • Examples
@elenatorro elenatorro mentioned this issue Dec 19, 2019
5 tasks
@Jesus89 Jesus89 self-assigned this Dec 19, 2019
@Jesus89 Jesus89 changed the title [ Visualization API Redesign ] - Style Style API Dec 19, 2019
@Jesus89
Copy link
Member

Jesus89 commented Dec 20, 2019

I would add only Step 4. Using the Style class adds duplicity and also implies to duplicate the functionality for each type. In Step 2, this should be done at the Layer level.

@elenatorro
Copy link
Contributor Author

Yes, let's start doing first the style helpers 👍I think point 5 is also important (and 6 of course but that's implicit 😛)

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

3 participants