Plotly.js: restyle of marker opacity not working for scattergl

Created on 26 Jan 2018  路  4Comments  路  Source: plotly/plotly.js

bug regression

All 4 comments

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.

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

@alexcjohnson thank, fixed in https://github.com/plotly/plotly.js/pull/2311/commits/a9d387aa14d3e2ade6768bcd2bbc20dcc22782b3. 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boleslawmaliszewski picture boleslawmaliszewski  路  3Comments

deecay picture deecay  路  3Comments

bryaan picture bryaan  路  3Comments

tim-sauchuk picture tim-sauchuk  路  3Comments

hashimmoosavi picture hashimmoosavi  路  3Comments