-
-
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
Styling a single marker #144
Comments
@aderidder Thanks for the suggestion. I like this idea, but I'm not 100% sure if it belongs in My main concern is coming up with an API on top of the current The current API supports: // restyle trace 1 in red
// restyle trace 2 in blue
Plotly.restyle('graph', 'marker.color', ['red', 'blue'], [1, 2]);
// restyle trace 1 pts in red and blue in alternate manner
// restyle trace 2 pts in green and yellow " " "
Plotly.restyle('graph', 'marker.color', [['red', 'blue'], ['green', 'yellow']], [1, 2]); Per-pt restyle could then look like: // restyle pt 20 of trace 1 in red & pt 21 of trace 1 in blue (and nothing else)
// restyle pt 20 of trace 2 in green & pt 21 of trace 2 in yellow (" " ")
Plotly.restyle('graph', 'marker.color', [['red', 'blue'], ['green', 'yellow']], [1, 2], [20, 21]); The last argument Problem there would no way to e.g. restyle pts 20 and 21 in trace 1 and 10 and 12 in trace 2 in one Alternatively, last argument could become a 2d array: // restyle pt 20 of trace 1 in red & pt 21 of trace 1 in blue (and nothing else)
// restyle pt 10 of trace 2 in green & pt 12 of trace 2 in yellow (" " ")
Plotly.restyle('graph', 'marker.color', [['red', 'blue'], ['green', 'yellow']], [1, 2], [[20, 21], [10, 12]]); but, that might be too confusing / non-intuitive. |
#1338 ensures that calls like |
@alexcjohnson I'm using |
@Discmt can you post a complete code example that shows the issue you've encountered? ie a codepen or something? When I try it, as long as |
Any definite solution found for this issue ? Can someone please post an sample code . |
Hi,
In a community post I recently enquired whether, in order to change the colour of a single marker in a 10000 marker trace, I'd have to provide the
plotly.restyle
with a complete array with colours, or whether it's possible to update just a single marker.Etienne's answer is that at the moment
plotly.restyle
can only be used to restyle a complete trace.The feature I'm requesting is a more fine-grained control, e.g. the possibility to change the colour of a single marker without having to style the complete trace.
Thanks,
Sander
The text was updated successfully, but these errors were encountered: