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 support for extra traces #40

Merged
merged 5 commits into from
Dec 14, 2020
Merged

Add support for extra traces #40

merged 5 commits into from
Dec 14, 2020

Conversation

almarklein
Copy link
Collaborator

  • Adds a extra_traces prop, which is a dcc.Store that users can write a list of traces to.
  • Adds example to show a contour this way.

I considered using pattern matching, which would make it possible for the application to define multiple stores for additional traces. However, by simply proving a store via a property, we make the simpler cases easier, and the more complex cases can still define multiple stores and then add a callback to aggregate these into the slicer.extra_traces.

Possible alternative names for extra_traces could be e.g. user_traces, `more_traces.

@almarklein almarklein mentioned this pull request Dec 11, 2020
Closed
16 tasks
@emmanuelle
Copy link
Contributor

Thanks! The checklist above mentions that you added an example showing a contour but I could not find it, did you maybe forget to add it?

@emmanuelle
Copy link
Contributor

Regarding the name, I like both extra_traces and user_traces (not so much more_traces). Maybe a slight preference for extra_traces ?

@almarklein
Copy link
Collaborator Author

[...] did you maybe forget to add it?

Yes I did :)

[...] Maybe a slight preference for extra_traces ?

Let's just stick with extra_traces then.

{
"type": "scatter",
"mode": "lines",
"line": {"color": "cyan", "width": 3},
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use different colors here for the different contours? It would make the example clearer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that each contour was a linepiece, but I just learned they are each one closed contour. Cool!

@emmanuelle
Copy link
Contributor

Just a color-related nitpicking comment, but it looks good to go!

@almarklein almarklein merged commit 745fc07 into main Dec 14, 2020
@almarklein almarklein deleted the extra-traces branch December 14, 2020 14:01
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