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

fillOpacity=1 does not create a completely opaque/solid fill for point marks #9137

Closed
joelostblom opened this issue Oct 12, 2023 · 4 comments · Fixed by #9238
Closed

fillOpacity=1 does not create a completely opaque/solid fill for point marks #9137

joelostblom opened this issue Oct 12, 2023 · 4 comments · Fixed by #9238
Labels
Bug 🐛 P3 Should be fixed at some point

Comments

@joelostblom
Copy link
Contributor

joelostblom commented Oct 12, 2023

It seems like setting fillOpacity=1 does not make points completely opaque. This is in contrast to setting opacity=1 which does have this effect. It is not that fillOpacity has no effect at all, lower values makes the fill more transparent, it just seems that the scale is shifted, which is confusing. I would expect fillOpacity=1 to make the fill of the points completely solid/opaque, just as opacity=1.

fillOpacity=1:
image
Open the Chart in the Vega Editor

opacity=1
image
Open the Chart in the Vega Editor

@kanitw
Copy link
Member

kanitw commented Oct 12, 2023

This is probably not a bug. I think, by design, Vega makes opacity/fillOpacity behavior consistent with SVG and Canvas.
https://stackoverflow.com/questions/37759898/opacity-vs-fill-opacity-in-svg

In any case, I'll move this ticket to Vega repo.

@kanitw kanitw transferred this issue from vega/vega-lite Oct 12, 2023
@jheer
Copy link
Member

jheer commented Oct 12, 2023

This is a Vega-Lite issue, as Vega-Lite is producing outputs with conflicting opacity and fillOpacity (see image). Vega is simply translating those down to SVG/Canvas as designed. I'll reassign back to the VL repo.

image

@jheer jheer transferred this issue from vega/vega Oct 12, 2023
@domoritz
Copy link
Member

We should probably not generate the default opacity for point marks when there is an explicit fillOpacity.

@domoritz domoritz added Bug 🐛 P3 Should be fixed at some point labels Oct 13, 2023
@kanitw
Copy link
Member

kanitw commented Oct 28, 2023

@joelostblom relevant code is here

image

I think it's probably safe to say we shouldn't set the default opacity if there is fillOpacity there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 P3 Should be fixed at some point
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants