-
Notifications
You must be signed in to change notification settings - Fork 59
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
Tornado improvements to the tornado component
and to VolumetricAnalysis
#825
Conversation
and to
VolumetricAnalysis`
and to
VolumetricAnalysis`tornado component
and to VolumetricAnalysis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are nice improvements to the TornadoPlot :)
- There is one bug that must be fixed with clickdata/hovermode.
- The tests are failing. I think it is because the
app
is not used in the plugin initialization any more. Just remove theapp
from the tests as well.
@@ -137,7 +138,7 @@ class VolumetricAnalysis(WebvizPluginABC): | |||
# pylint: disable=too-many-arguments | |||
def __init__( | |||
self, | |||
app: Dash, | |||
# app: Dash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
options=[{"label": i, "value": i} for i in volumemodel.responses], | ||
value=volumemodel.responses[0], | ||
), | ||
html.Details( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified as the wcc.Select
now incorporates html.Details
directly.
equinor/webviz-core-components#182
@@ -133,3 +134,15 @@ def add_correlation_line(figure: go.Figure, xy_min: float, xy_max: float) -> go. | |||
y1=xy_max, | |||
line=dict(color="black", width=2, dash="dash"), | |||
) | |||
|
|||
|
|||
def create_figure_matrix(figures: List[go.Figure]) -> List[List[go.Figure]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider generalizing and move to webviz_subsurface/utils
.
Make an issue on it for now?
for prop in ["options", "value", "disabled"] | ||
) | ||
|
||
def sens_colors() -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These colors are hard-coded here because the Equinor theme does not provide appropriate colors for this use case.
Perhaps we should add a categorical
colorscale to the equinor theme?
@asnyv , @anders-kiaer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that, but I didn't get the use case for adding categorical
colorscales in addition to the existing colorway
/qualitative
. Could you expand on the use case (and how it is related to the screenshots above) @HansKallekleiv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit quick! The current colorway / qualitative setup in the theme is fine. I'm struggling a bit with the choice of colors though. We can discuss elsewhere :)
@@ -227,7 +259,8 @@ def layout(self) -> Dict: | |||
"tickfont": {"size": 15}, | |||
}, | |||
"showlegend": False, | |||
"hovermode": "y", | |||
"hovermode": "closest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing hovermode
from "y" to "closest" causes the "on click" callback in TornadoWidget
to fail as it previously received both low and high bars as input, but now only receives the one that is clicked.
This has either to be changed back or atleast set to "y" if the allow_click
option is set.
Alternatively investigate if there is some way to separate hovermode from the data received from clickData
.
This seems to be a bug/limitation in Plotly.
b9946ef
to
a162990
Compare
a162990
to
02aeb0e
Compare
PR which includes improvements to the
tornado component
and the "tornado" tab inVolumetricAnalysis
.Main changes to the
tornado component
:Main layout changes to the "tornado" tab in
VolumetricAnalysis
:mode
selector with buttons to be able to store the previous selection for the different pages in the same manner as the "Inplace distribution" tabAlso
webviz_subsurface._utils
for creating "selected realizations" string from list of integersapp
instances from VolumetricAnalysisContributor checklist
CHANGELOG.md
, and added it if should be communicated there.