-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add xref
and yref
to colorbars
#6593
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
+1,042
−254
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7d38cf0
Update schema and set defaults
hannahker 346f27e
Update reservedMargins for colorbars
hannahker b1c1862
Fix syntax
hannahker 8b23475
Adjust positioning and margins for container referencing
hannahker 2177901
Add mock
hannahker 61e8277
Fix positioning of colorbar titles
hannahker 2594e59
Update defaults
hannahker df89559
Add title to mock
hannahker f84232a
Add changelog
hannahker 845553e
Fix bug in title positioning
hannahker 5ec6f66
Add image baseline
hannahker 0195049
Rename mocks and add horizontal example
hannahker ad22f4f
Fix mock syntax
hannahker 4feac39
Update baselines for mocks
hannahker 431b663
Coerce min/max of x and y depending on xref and yref
hannahker 39277d9
Remove unneeded baseline
hannahker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add `colorbar.xref` and `colorbar.yref` to enable container-referenced positioning for plot colorbars [[#6593](https://github.com/plotly/plotly.js/pull/6593)], with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"colorbar": { | ||
"orientation": "v", | ||
hannahker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"xref": "container", | ||
"thickness": 10, | ||
"ticks": "outside", | ||
"bgcolor": "rgba(255,255,0,0.5)", | ||
"borderwidth": 4, | ||
"bordercolor": "gray", | ||
"title": { | ||
"side": "top", | ||
"text": "Colorbar<br>title", | ||
"font": { | ||
"size": 16 | ||
} | ||
} | ||
}, | ||
"z": [ | ||
[ | ||
1, | ||
3, | ||
5 | ||
], | ||
[ | ||
4, | ||
7, | ||
10 | ||
], | ||
[ | ||
7, | ||
11, | ||
14 | ||
] | ||
], | ||
"type": "heatmap" | ||
} | ||
], | ||
"layout": { | ||
"margin": {"l": 0, "r": 0, "t": 0, "b": 0}, | ||
"height": 300, | ||
"width": 400, | ||
"yaxis": {"automargin": true, "side": "right", "title": {"text": "Y-axis title"}}, | ||
"title": {"text": "Colorbar with `xref='container'`", "automargin": true} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.