8000 Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) by emilykl · Pull Request #7216 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Drop support for deprecated error bar opacity attribute (use alpha channel of error bar color attribute instead) #7216

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

Merged
merged 8 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update mock
  • Loading branch information
emilykl committed Oct 7, 2024
commit dd70baccdfda43c638fa705069815016ee4af2fc
6 changes: 2 additions & 4 deletions test/image/mocks/error_bar_style.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,14 @@
"value": 0.1,
"color": "#85144B",
"thickness": 1.5,
"width": 3,
"opacity": 1
Copy link
Contributor

Choose a reason for hiding this comment

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

just for my own learning, what happened to "opacity"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

opacity can also be specified by using the alpha channel of the color attribute, which defaults to full-opacity, so the same image result can be achieved without explicitly setting the opacity.

I guess for the purposes of this test it might make sense to include it explicitly though.

Copy link
Contributor

Choose a reason for hiding this comment

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

very happy to use color instead (fewer parameters is better) - was just wondering how we were now handling it - thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why we chose to deprecate opacity here though and not elsewhere, maybe @archmoj has an idea

Copy link
Collaborator

Choose a reason for hiding this comment

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

In some places - particularly where multiple colors or multiple objects are involved - there are many different effects you can achieve depending on exactly where you set the opacity

Screenshot 2024-10-08 at 10 15 34

Here though I guess there's nothing you can't achieve just with the opacity of the color.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes perfect sense -- thanks @alexcjohnson .

"width": 3
},
"error_x": {
"type": "constant",
"value": 0.2,
"color": "#85144B",
"thickness": 1.5,
"width": 3,
"opacity": 1
"width": 3
},
"marker": {
"color": "#85144B",
Expand Down
0