-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Customized Click, Hover, and Selection Styles or Traces #1847
Comments
I haven't thought about the attribute specs that much yet. One way to get some of these interactions would be through a
That doesn't cover the case for drawing a vertical or horizontal line over points. |
With custom hover attributes, perhaps users could create their tooltips by using a combination of annotations, shapes, and images that are triggered on and off through custom |
cc @charleyferrari who might have some additional examples too |
Example from @cpsievert 's work. In this case, highlighting across subplots. That type of linking hover across traces might be out of the scope of this. |
Indeed a solution for this would be useful (needed) for the crossfilter as we discussed in #1762 WARNING: totally my personal ramblings and biases only; in part informed by the crossfiltered dashboard work: If possible, it'd be great to separate the activating affordances (e.g. Click, Hover, Selection, or crossfiltering some points away from another plot) from the specific temporary restyling ie. visual channel updates, as it may depend, as @chriddyp you write, on the intent such as clicking could indicate various intents, e.g. drilling down, including/excluding from filter, showing atomic data for point or jumping to an external link. A dashboard may have various inputs external to the plotly widgets or concepts, e.g. streaming stock prices would highlight the ticker (and time series line) of the last traded stock, or a UI tour or storytelling, so it might be beneficial to make these work and be assignable depending on how the context requires it. Having made this separation, I think the affordances part is trivial as these With the current
|
That sounds painful. We could do better. |
We could maybe attach Plotly.newPlot('graph', [{
mode: 'markers',
x: [1, 2, 3],
y: [2, 1, 2],
marker: {
color: 'red'
},
interaction: {
type: 'hover', // or 'click' or 'select'
method: 'restyle',
args: ['marker.color', 'blue']
}
}]) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
#1943 is now closed but its comments are pertinent to this discussion. |
In Dash, I'd like |
|
That works, thanks! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Is this possible? I have markers that open a modal when clicked, but it isn't clear to the user that they are clickable. I'm trying to figure out how to get the cursor to change to a hand pointer e.g. cursor: pointer when hovering over the marker. I am using react |
Would love to know how I can help. Is this under active development? |
Hi Sebastian,
We have a fairly well developed code for analyzing data from our experiments. Each experiment lasts just less than 1 second, then we have a 15 minutes down time where our power supplies are re-charged, during this down time we have to analyze data, and based on that analysis make some changes before the next experiment.
This data visualization tool which we have developed is under active development.
For our purposes we have a single large app with several pages (the management is quite easy as there is little communication between pages).
Attached is an example of a feature which we often use in various different pages. As this isn’t a multi-page app I haven’t got some of the triggering to work correctly, so if you to start click “>” the app will start.
In the app there are two graphs:
1. interactive_graph Has an editable shape which we use as a slider to select a time which is of interest to us.
2. graph2 Then displays some information based on where this slider is.
There are also two buttons which we can click which will skip a pre-defined amount through time.
We also display the time where the slider has been mode to.
All of this code is functional and working, but if the interactive_graph has a lot of data it can take a long time to re-plot (which is unnecessary). It is also quite cumbersome – needing several callbacks which have to be modified every time we use this feature. We also have to do the placement to the next and back buttons which is a bit annoying.
What we would ideally like is for a trigger to come from the client side which tells us to re-plot graph2.
Do we have a time which we can talk tomorrow?
Thanks,
Peter
From: Sebastian Heyneman <[email protected]>
Sent: 13 June 2020 22:51
To: plotly/plotly.js <[email protected]>
Cc: Peter Buxton <[email protected]>; Manual <[email protected]>
Subject: Re: [plotly/plotly.js] Customized Click, Hover, and Selection Styles or Traces (#1847)
Would love to know how I can help. Is this under active development?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#1847 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABFSBRE4A53L25SBLW7IKQ3RWPYELANCNFSM4DRWINVQ>.
|
I am trying to figure this out. I'd like to update modal popup based on scatter mapbox marker click event data. How did you do it?
|
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. Sponsorship range: $45k-$50k What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
Would like to chime in on the possibility of simply disabling the tooltips. I still want the click behavior to return the closest point. I just don't want the tooltip at all. |
@inselbuch that should just be |
Wonderful!
I had tried "skip" ... did not see "none"
You are a rock star.
…Sent from my iPad
On Nov 6, 2020, at 9:14 AM, Alex Johnson <[email protected]> wrote:
@inselbuch<https://github.com/inselbuch> that should just be hoverinfo: 'none' https://plotly.com/javascript/reference/scatter/#scatter-hoverinfo
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1847 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFMVC6MHADOK7LDBPCLM3BDSOQHDFANCNFSM4DRWINVQ>.
|
I linked here from part 4 of the tutorial . I just wanted to chime in that it is possible to customize the hover interactions while using a selection box by changing the code in the tutorial in the "Generic Crossfilter Recipe" section:
and then getting rid of
I'm not sure if this addresses all of the issues presented here or if someone else has already mentioned it before but at the very least the tutorial should probably be updated to use |
@Andrej4156 thanks! I think the |
ECharts is powerful, has a feature of "hover on legend to highlight the respective series and dim the rest of series", please check apache/echarts#17200. |
Plotly.js has default styles for hovering (tooltips) and for selection (dimmed traces).
In Dash, users want to be able to customize these styles. While they can customize these styles themselves through Dash callbacks, it's slow (roundtrip to server). And while I could write this behaviour into the Dash
Graph
component, it would be great if this was standard behaviour that everyone could benefit from.Here are some examples that customized interaction styles or traces could enable.
As requested in the Dash community forum
In addition to this example, users might want to:
In this Uber Rides Dash demo created by @alishobeiri, the selected bars are replotted to be white. This persistent style informs the user which bars are selected and also matches the color palette of app itself.
While selected markers have a "dimming" effect, some users will want to customize the style of the selected points and the unselected points. For example, they might want to:
mode: "markers+text"
)In BI platforms, "clicking" is often used for drill downs. While we support click events, we don't modify the look and feel of the graph after clicking. For example, users might want to display constant text when clicking on a point.
In addition, there are a few other default style changes for clickable points (this could be a separate issue):
cursor: pointer
and making the point a little bit largerI'm sure there are many more examples out there.
cc @alexcjohnson @etpinard @cpsievert @monfera @jackparmer
The text was updated successfully, but these errors were encountered: