-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6593 from plotly/colorbar-positioning
Add `xref` and `yref` to colorbars
- Loading branch information
Showing
9 changed files
with
1,042 additions
and
254 deletions.
There are no files selected for viewing
This file contains 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 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 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 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.
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 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,48 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"colorbar": { | ||
"orientation": "h", | ||
"yref": "container", | ||
"y": 0, | ||
"yanchor": "bottom", | ||
"thickness": 10, | ||
"ticks": "outside", | ||
"bgcolor": "rgba(255,255,0,0.5)", | ||
"borderwidth": 4, | ||
"bordercolor": "gray", | ||
"title": { | ||
"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, | ||
"xaxis": {"automargin": true, "title": {"text": "X-axis title"}}, | ||
"title": {"text": "Colorbar with `yref='container'` | horizontal", "automargin": true} | ||
} | ||
} |
This file contains 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", | ||
"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' | vertical`", "automargin": true} | ||
} | ||
} |
Oops, something went wrong.