Skip to content

Marker/line opacity unaffected by restyle when fill=toself #884

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

Closed
cpsievert opened this issue Aug 25, 2016 · 5 comments · Fixed by #896
Closed

Marker/line opacity unaffected by restyle when fill=toself #884

cpsievert opened this issue Aug 25, 2016 · 5 comments · Fixed by #896
Assignees
Labels
bug something broken
Milestone

Comments

@cpsievert
Copy link

http://codepen.io/cpsievert/pen/ZOdVOk

@etpinard etpinard added the bug something broken label Sep 1, 2016
@rreusser
Copy link
Contributor

rreusser commented Sep 1, 2016

Not fixed by the big changes in animations: http://codepen.io/rsreusser/pen/ozNkEv

@etpinard etpinard self-assigned this Sep 1, 2016
@rreusser
Copy link
Contributor

rreusser commented Sep 1, 2016

Seems like perhaps an issue with restyle figuring out what needs to update, in which case this shouldn't be affected by the animation PR. (otherwise wouldn't recommend fixing before merge)

@etpinard
Copy link
Contributor

etpinard commented Sep 1, 2016

After some investigation:

  • this issue has nothing to do with toself, all fill values behave the same
  • I believe this is the desired behavior. Trace opacity does not impact fillcolor. See the current logic fillcolor default logic here.

In brief, fillcolor defaults to:

  • line.color with 0.5 alpha channel,
  • if line.color isn't set, marker.color with 0.5 alpha channel,
  • if line.color and marker.color aren't set, marker.line.color with 0.5 alpha channel,
  • if line.color, marker.color and marker.line.color aren't set, the default trace color with 0.5 alpha channel.

But, as discussed with @cpsievert , trace opacity should really impact the fill color. The fact that plotly.js doesn't do that at the moment is a design flaw - that unfortunately cannot be easily fixed in a backward-compatible way.

We should consider making opacity impact fill color in the v2.0.0 release. Changing the issue title accordingly.

@etpinard etpinard added feature something new bug something broken and removed bug something broken feature something new labels Sep 1, 2016
@etpinard
Copy link
Contributor

etpinard commented Sep 1, 2016

Oops. I didn't read the issue title correctly.

There is in fact a bug here - where we explicitly remove trace opacity from traces that have a non-none fill value to avoid edge-case inconsistencies. Please refer to this 2015 issue for the details.

But, the aforementioned inconsistency does not apply to toself traces. Fix is coming up.

@tsando
Copy link

tsando commented Jan 30, 2018

Sorry, I was a bit lost by the thread comments and links but is there a workaround or fix for this yet? I wan to make the opacity apply to the fill area color. Is there any way to do this using toself? Thanks.

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 a pull request may close this issue.

4 participants