forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDimensions.fs
More file actions
64 lines (53 loc) · 1.99 KB
/
Copy pathDimensions.fs
File metadata and controls
64 lines (53 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace Plotly.NET
open System
/// Dimensions type inherits from dynamic object
type Dimensions () =
inherit DynamicObj ()
/// Initialized Dimensions object
static member init
(
?Values,
?Range,
?Constraintrange,
?Visible,
?Label,
?Tickvals,
?TickText,
?TickFormat
) =
Dimensions ()
|> Dimensions.style
(
?Values = Values ,
?Range = Range ,
?Constraintrange = Constraintrange,
?Visible = Visible,
?Label = Label,
?Tickvals = Tickvals,
?TickText = TickText,
?TickFormat = TickFormat
)
// Applies the styles to Dimensions()
static member style
(
?Values : seq<#IConvertible>,
?Range : StyleParam.Range,
?Constraintrange : StyleParam.Range,
?Visible,
?Label,
?Tickvals,
?TickText,
?TickFormat
) =
(fun (dims:Dimensions) ->
Values |> DynObj.setValueOpt dims "values"
Range |> DynObj.setValueOptBy dims "range" StyleParam.Range.convert
Constraintrange |> DynObj.setValueOptBy dims "constraintrange" StyleParam.Range.convert
Visible |> DynObj.setValueOpt dims "Visible"
Label |> DynObj.setValueOpt dims "label"
Tickvals |> DynObj.setValueOpt dims "tickvals"
TickText |> DynObj.setValueOpt dims "ticktext"
TickFormat |> DynObj.setValueOpt dims "tickformat"
// out ->
dims
)