You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the linked issue above, a solution was provided to style a single marker on a line. However, the identifier for the marker seems to be hardcoded.
To be more specific, the solution is to use restyle like this: Plotly.restyle(gd, {'marker.color[23]': 'red'}, null, [0])
This does in fact work, and changes the 23rd index marker to red. However, if I change the code to something like this: let dynamicallyFoundIndex = 14; let str = "marker.color[" + dynamicallyFoundIndex + "]"; Plotly.restyle(gd, {str: 'red'}, null, [0])
Nothing happens. No errors in the console, and no markers' styling changes.
Hopefully I'm overlooking something simple here, but I haven't been able to get this to work. Any help is appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
Related to issue#144.
In the linked issue above, a solution was provided to style a single marker on a line. However, the identifier for the marker seems to be hardcoded.
To be more specific, the solution is to use restyle like this:
Plotly.restyle(gd, {'marker.color[23]': 'red'}, null, [0])
This does in fact work, and changes the 23rd index marker to red. However, if I change the code to something like this:
let dynamicallyFoundIndex = 14;
let str = "marker.color[" + dynamicallyFoundIndex + "]";
Plotly.restyle(gd, {str: 'red'}, null, [0])
Nothing happens. No errors in the console, and no markers' styling changes.
Hopefully I'm overlooking something simple here, but I haven't been able to get this to work. Any help is appreciated. Thanks!
The text was updated successfully, but these errors were encountered: