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 plot controls to volcano plots #404

Merged
merged 9 commits into from
Aug 9, 2023
Merged

Conversation

jernestmyers
Copy link
Contributor

@jernestmyers jernestmyers commented Aug 4, 2023

Resolves items 5 and 6 from #358

NOTE: this work is branched off of #392 (merged)

image

Notes:

  • The calculations for the default axis ranges get very messy, so we decided (for now, at least) to use Math.floor() on the min values and Math.ceil() on the max values.
  • Notice I'm not labeling these X-axis controls with `X-axis range beneath it and likewise for the y-axis. It felt weird to have the Header/Subheader relationship when the only controls are for the ranges.
  • I didn't add the radio buttons for "Full", "Auto-zoom" and "Custom" as I wasn't sure if they were desired.

Happy to make any changes to the decisions/assumptions I made.

@jernestmyers jernestmyers mentioned this pull request Aug 4, 2023
9 tasks
@jernestmyers jernestmyers marked this pull request as ready for review August 7, 2023 15:52
Copy link
Member

@asizemore asizemore left a comment

Choose a reason for hiding this comment

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

Looks great! Works perfectly! Can we put the marker opacity slider under Plot Controls please?

And i agree with all the notes you left. We don't need the auto-zoom, full, and custom because we don't have a difference between auto-zoom and full, since there are no display ranges here!

@@ -166,6 +166,24 @@ const modalPlotContainerStyles = {
margin: 'auto',
};

// implement gradient color for slider opacity
export const colorSpecProps: SliderWidgetProps['colorSpec'] = {
Copy link
Member

Choose a reason for hiding this comment

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

since we're going to use this elsewhere, shall we give it a more descriptive name? Maybe sliderOpacityColorSpecProps? Or something with "gradient color" in it?

Copy link
Member

Choose a reason for hiding this comment

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

I wonder do we have anywhere more general for this to live?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remember thinking the same thing, so I'll see what I can come up with!

@jernestmyers
Copy link
Contributor Author

Can we put the marker opacity slider under Plot Controls please?

Do we have any concerns that it lines up beneath the x-axis controls?
image

@asizemore
Copy link
Member

sorry my comment was too vague - i mean can the opacity live in its own section called Plot Controls? Like we do on the scatterplot where it says Plot Mode (marker opacity shouldn't really be in. the Plot Mode section, instead that section should be called Plot Controls or something... anyways... lol). My hope is to prevent the friendly opacity slider from floating around without a section header to guide it 😄

Screen Shot 2023-08-08 at 6 45 40 AM

@jernestmyers
Copy link
Contributor Author

Updated screenshot:

image

Copy link
Member

@asizemore asizemore left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks @jernestmyers !

@jernestmyers jernestmyers merged commit e5396e5 into main Aug 9, 2023
1 check passed
@jernestmyers jernestmyers deleted the diff-abundance-plot-controls branch August 9, 2023 14:00
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