Skip to content

v0.3

Latest
Compare
Choose a tag to compare
@Iridium-IO Iridium-IO released this 25 Oct 13:29
· 1 commit to master since this release

Options can now be defined using the Options.Generic and derived classes.
Available pre-defined types are:

  • Options.Title
  • Options.Legend
    • Options.Legend_Labels
  • Options.Layout

These pre-defined types simply provide default kwargs for autocompletion, and are completely optional.
See here for details

Before:

class options:
    title = {"text": "My Chart", "display": True} 
    animation = {"duration": 1000}
    legend = {
            'position': 'bottom', 
            'labels': {
                'fontColor': Color.Gray, 
                'fullWidth': True
                }
            }

After

class options:
    title = Options.Title('My Chart')
    animation = Options.Generic(duration=1000)
    _labels = Options.Legend_Labels(fonColor=Color.Gray, fullwidth=True)
    legend = Options.Legend(position='bottom', labels=_labels)