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

support legends #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ThomasLoew
Copy link

@ThomasLoew ThomasLoew commented Jan 20, 2022

#3

Copy link
Contributor

@tshirtman tshirtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me, i didn't test, as i don't use that code, but seems like a good feature to have, and i'd rather not block it just because there is not much dev focus on that widget, it sure could use some love!

kivy_garden/graph/__init__.py Outdated Show resolved Hide resolved
@@ -174,6 +296,8 @@ class Graph(Widget):
'''

def __init__(self, **kwargs):
self._legend: Union[BoxLayout, None] = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an Optional type for this (use Optional[BoxLayout] instead).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Didn't know that.

@@ -174,6 +296,8 @@ class Graph(Widget):
'''

def __init__(self, **kwargs):
self._legend: Union[BoxLayout, None] = None
self._legend_plots: Tuple[Plot] = tuple()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you mean Tuple[Plot, ...] ? (i think you are currently defining a tuple of one element of type Plot, not of any number of Plot elements).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants