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
- Add Layout API functions to retrieve all instances of a subplot (e.g. all x axes)
- fix some typos in dynamic member setters
- add various layout object/API tests
(fun(layout: Layout)-> layout |> Layout.tryGetLinearAxisById id |> Option.defaultValue (LinearAxis.init ()))
586
586
587
+
/// <summary>
588
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid x axes (if the key matches and object can be cast to the correct type).
589
+
/// </summary>
590
+
/// <param name="layout">The layout to get the x axes from</param>
if StyleParam.SubPlotId.isValidXAxisId kv.Key then
595
+
match layout.TryGetTypedValue<LinearAxis>(kv.Key)with
596
+
| Some axis -> Some (kv.Key, axis)
597
+
| None -> None
598
+
else None
599
+
)
600
+
601
+
/// <summary>
602
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid y axes (if the key matches and object can be cast to the correct type).
603
+
/// </summary>
604
+
/// <param name="layout">The layout to get the y axes from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetSceneById id |> Option.defaultValue (Scene.init ()))
635
663
664
+
665
+
/// <summary>
666
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid scenes (if the key matches and object can be cast to the correct type).
667
+
/// </summary>
668
+
/// <param name="layout">The layout to get the scenes from</param>
if StyleParam.SubPlotId.isValidSceneId kv.Key then
673
+
match layout.TryGetTypedValue<Scene>(kv.Key)with
674
+
| Some scene -> Some (kv.Key, scene)
675
+
| None -> None
676
+
else None
677
+
)
678
+
636
679
/// <summary>
637
680
/// Sets a scene object on the layout as a dynamic property with the given scene id.
638
681
/// </summary>
@@ -674,6 +717,20 @@ type Layout() =
674
717
static membergetGeoById(id:StyleParam.SubPlotId)=
675
718
(fun(layout: Layout)-> layout |> Layout.tryGetGeoById id |> Option.defaultValue (Geo.init ()))
676
719
720
+
/// <summary>
721
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid geo subplots (if the key matches and object can be cast to the correct type).
722
+
/// </summary>
723
+
/// <param name="layout">The layout to get the geos from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetMapboxById id |> Option.defaultValue (Mapbox.init ()))
719
776
777
+
/// <summary>
778
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid mapbox subplots (if the key matches and object can be cast to the correct type).
779
+
/// </summary>
780
+
/// <param name="layout">The layout to get the mapboxes from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetPolarById id |> Option.defaultValue (Polar.init ()))
764
835
836
+
/// <summary>
837
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid polar subplots (if the key matches and object can be cast to the correct type).
838
+
/// </summary>
839
+
/// <param name="layout">The layout to get the polars from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetSmithById id |> Option.defaultValue (Smith.init ()))
809
894
895
+
/// <summary>
896
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid smith subplots (if the key matches and object can be cast to the correct type).
897
+
/// </summary>
898
+
/// <param name="layout">The layout to get the smiths from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetColorAxisById id |> Option.defaultValue (ColorAxis.init ()))
854
953
954
+
/// <summary>
955
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid color axes (if the key matches and object can be cast to the correct type).
956
+
/// </summary>
957
+
/// <param name="layout">The layout to get the color axes from</param>
(fun(layout: Layout)-> layout |> Layout.tryGetTernaryById id |> Option.defaultValue (Ternary.init ()))
899
1012
1013
+
/// <summary>
1014
+
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid ternary subplots (if the key matches and object can be cast to the correct type).
1015
+
/// </summary>
1016
+
/// <param name="layout">The layout to get the ternaries from</param>
/// Returns a sequence of key-value pairs of the layout's dynamic members that are valid legends (if the key matches and object can be cast to the correct type).
1077
+
/// </summary>
1078
+
/// <param name="layout">The layout to get the color axes from</param>
0 commit comments