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

restyle of marker opacity not working for scattergl #2299

Closed
cpsievert opened this issue Jan 25, 2018 · 4 comments
Closed

restyle of marker opacity not working for scattergl #2299

cpsievert opened this issue Jan 25, 2018 · 4 comments
Labels
bug something broken regression this used to work

Comments

@cpsievert
Copy link

cpsievert commented Jan 25, 2018

https://codepen.io/cpsievert/pen/Rxzzzz

cc @dfcreative

@alexcjohnson
Copy link
Collaborator

Interestingly Plotly.restyle(gd, {"marker.opacity": 0.1}); seems to work fine, as does the trace.opacity attribute on the initial draw - it's just Plotly.restyle(gd, {"opacity": 0.1}); that fails.

@dfcreative you probably just have to explicitly define opacity in scattergl/attributes, like we do in eg surface/attributes so you can get editType: 'calc' instead of editType: 'style' that you get from the base opacity attribute. And assuming that fixes it, take a quick spin through the rest of those base attributes and see if anything else is broken the same way.

@alexcjohnson alexcjohnson added the bug something broken label Jan 25, 2018
@etpinard
Copy link
Contributor

Better yet, maybe we could make ScatterGl.style handle trace opacity updates.

@etpinard etpinard added the regression this used to work label Jan 30, 2018
@dy dy mentioned this issue Jan 30, 2018
3 tasks
@dy
Copy link
Contributor

dy commented Jan 31, 2018

@alexcjohnson thank, fixed in a9d387a. Making ScatterGl.styleto do options recalculation (that is required to update opacity, since resulting opacity depends on trace.opacity, marker.opacity and color alpha) would be unnecessary complexity and mostly duplication.

@etpinard
Copy link
Contributor

etpinard commented Feb 2, 2018

fixed in #2311

@etpinard etpinard closed this as completed Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken regression this used to work
Projects
None yet
Development

No branches or pull requests

4 participants