You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
[](https://github.com/plotly/Plotly.NET/actions/workflows/build-and-test.yml)
Copy file name to clipboardExpand all lines: src/Plotly.NET/CommonAbstractions/ColorBar.fs
+13-3
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,11 @@ type ColorBar() =
52
52
/// <param name="X">Sets the x position of the color bar (in plot fraction).</param>
53
53
/// <param name="XAnchor">Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar.</param>
54
54
/// <param name="XPad">Sets the amount of padding (in px) along the x direction.</param>
55
+
/// <param name="XRef">Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.</param>
55
56
/// <param name="Y">Sets the y position of the color bar (in plot fraction).</param>
56
57
/// <param name="YAnchor">Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar.</param>
57
58
/// <param name="YPad">Sets the amount of padding (in px) along the y direction.</param>
59
+
/// <param name="YRef">Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.</param>
Copy file name to clipboardExpand all lines: src/Plotly.NET/Layout/ObjectAbstractions/Common/Legend.fs
+15-3
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,10 @@ type Legend() =
33
33
/// <param name="Visible">Determines whether or not this legend is visible.</param>
34
34
/// <param name="X">Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.</param>
35
35
/// <param name="XAnchor">Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.</param>
36
+
/// <param name="XRef">Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.</param>
36
37
/// <param name="Y">Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.</param>
37
38
/// <param name="YAnchor">Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.</param>
39
+
/// <param name="YRef">Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.</param>
/// <param name="Visible">Determines whether or not this legend is visible.</param>
113
119
/// <param name="X">Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.</param>
114
120
/// <param name="XAnchor">Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.</param>
121
+
/// <param name="XRef">Sets the container `x` refers to. "container" spans the entire `width` of the plot. "paper" refers to the width of the plotting area only.</param>
115
122
/// <param name="Y">Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.</param>
116
123
/// <param name="YAnchor">Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.</param>
124
+
/// <param name="YRef">Sets the container `y` refers to. "container" spans the entire `height` of the plot. "paper" refers to the height of the plotting area only.</param>
let``Colorbar X/YRef HTML codegeneration tests`` =
16
+
testList "UpstreamFeatures.PlotlyJS_2_23"[
17
+
testList "Colorbar X/YRef"[
18
+
testCase "Heatmap with horizontal colorbar with x/yref = container data"(fun()->
19
+
"""var data = [{"type":"heatmap","z":[[1,2,3],[3,2,1]],"colorbar":{"orientation":"h","title":{"text":"Colorbar 1"},"x":0.5,"xref":"container","y":0.1,"yref":"container"}}];"""
20
+
|> chartGeneratedContains ``Colorbar X and Y ref``.``Heatmap with horizontal colorbar with x/yref = container``
21
+
)
22
+
testCase "Heatmap with horizontal colorbar with x/yref = container layout"(fun()->
23
+
emptyLayout ``Colorbar X and Y ref``.``Heatmap with horizontal colorbar with x/yref = container``
24
+
)
25
+
]
26
+
]
27
+
28
+
module``LegendX andY ref`` =
29
+
30
+
[<Tests>]
31
+
let``Legend X/YRef HTML codegeneration tests`` =
32
+
testList "UpstreamFeatures.PlotlyJS_2_23"[
33
+
testList "Legend X/YRef"[
34
+
testCase "Point chart with horizontal legend with x/yref = container data"(fun()->
35
+
"""var data = [{"type":"scatter","showlegend":true,"mode":"markers","x":[1],"y":[2],"marker":{},"line":{}}];"""
36
+
|> chartGeneratedContains ``Legend X and Y ref``.``Point chart with horizontal legend with x/yref = container``
37
+
)
38
+
testCase "Point chart with horizontal legend with x/yref = container layout"(fun()->
0 commit comments