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

Plotly restyle doesnt work properly! #748

Closed
rudresh-ajgaonkar opened this issue Jul 15, 2016 · 3 comments
Closed

Plotly restyle doesnt work properly! #748

rudresh-ajgaonkar opened this issue Jul 15, 2016 · 3 comments

Comments

@rudresh-ajgaonkar
Copy link

hey i think this is a probable issue.

When i try to restyle the plot, the plot legend shows only 1 color

Here is the codepen.
http://codepen.io/rudi8292/pen/RRxBAQ

if i click on "Click here for update", the data points get a white colored circle around them.

Thanks!

@rreusser
Copy link
Contributor

Can you clarify what you expect? The syntax you've used assigns the array [1, 2, 3, 4, 5] to each trace. If you wanted to assign a point to each trace respectively, then you could use:

  var update = {
          x : [[1],[2],[3],[4],[5]],
          y : [[1],[2],[3],[4],[5]],
          z : [[1],[2],[3],[4],[5]],
          size :[[12],[13],[14],[15],[16]],
          'marker.color' : [["#001"],["#005"],["#0f0"],["#f00"],["#00f"]],
           text : "size"
      }
       Plotly.restyle('myDiv', update, [0,1,2,3,4]);

@rudresh-ajgaonkar
Copy link
Author

Extremely Sorry for raising this as issue ! It works as it should. Yes, i wanted to send data to respective traces.
Really sorry for the false alarm

@rreusser
Copy link
Contributor

No prob! I did exactly the same thing a few different ways before getting the update pattern figured out. 👍🏼

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

No branches or pull requests

2 participants