Skip to content

Conversation

@archmoj
Copy link
Contributor

@archmoj archmoj commented May 25, 2020

Addressing #2953 | demo.

This PR is a fix for displaying point colors set by scatter3d (marker|line).color with/without colorscale.
It also fixes display of point colors used in scattergl (marker|line).color array (i.e. without colorscale).

TODO:

  • add a jasmine tests

@plotly/plotly_js

@nasreddineskandrani
Copy link

nasreddineskandrani commented Aug 25, 2020

hi,
@archmoj what is the state of this PR?
note that i am not able to see the chart in your demo link. Is it still working your side in the codepen?

@archmoj
Copy link
Contributor Author

archmoj commented Sep 3, 2020

hi,
@archmoj what is the state of this PR?
note that i am not able to see the chart in your demo link. Is it still working your side in the codepen?

@nasreddineskandrani
We basically need to add tests.
Also FYI - I updated the demo with a fresh build.


function arrayToColor(colors) {
if(!Lib.isArrayOrTypedArray(colors)) {
return _arrayToColor(colors);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return null here and avoid the outer isArrayOrTypedArray test in _arrayToColor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Done in 33fd07d.

@alexcjohnson
Copy link
Collaborator

@archmoj looks good - just a test as you mention, then this should be ready!

@nasreddineskandrani
Copy link

nasreddineskandrani commented Sep 11, 2020

in the demo, the orange flat circle is not orange. (the green same thing)
image

@archmoj
Copy link
Contributor Author

archmoj commented Sep 11, 2020

in the demo, the orange flat circle is not orange. (the green same thing)
image

Yeah. That's the limitation of handling typed arrays in scattergl at the moment.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 💃

@archmoj archmoj merged commit 34c82d2 into master Sep 16, 2020
@archmoj archmoj deleted the gl-hover-color branch September 16, 2020 01:00
@archmoj archmoj added this to the v1.56.0 milestone Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug something broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants