forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShape.fs
More file actions
76 lines (68 loc) · 2.5 KB
/
Copy pathShape.fs
File metadata and controls
76 lines (68 loc) · 2.5 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
65
66
67
68
69
70
71
72
73
74
namespace Plotly.NET
/// Shape type inherits from dynamic object
type Shape () =
inherit DynamicObj ()
/// Init Shape type
static member init
(
?ShapeType ,
?X0 ,
?X1 ,
?Y0 ,
?Y1 ,
?Path ,
?Opacity ,
?Line ,
?Fillcolor ,
?Layer ,
?Xref ,
?Yref
) =
Shape()
|> Shape.style
(
?ShapeType = ShapeType ,
?X0 = X0 ,
?X1 = X1 ,
?Y0 = Y0 ,
?Y1 = Y1 ,
?Path = Path ,
?Opacity = Opacity ,
?Line = Line ,
?Fillcolor = Fillcolor ,
?Layer = Layer ,
?Xref = Xref ,
?Yref = Yref
)
// Applies the styles to Shape()
static member style
(
?ShapeType : StyleParam.ShapeType,
?X0 ,
?X1 ,
?Y0 ,
?Y1 ,
?Path ,
?Opacity ,
?Line : Line,
?Fillcolor ,
?Layer :StyleParam.Layer,
?Xref ,
?Yref
) =
(fun (shape:Shape) ->
ShapeType |> DynObj.setValueOptBy shape "type" StyleParam.ShapeType.toString
Xref |> DynObj.setValueOpt shape "xref"
X0 |> DynObj.setValueOpt shape "x0"
X1 |> DynObj.setValueOpt shape "x1"
Yref |> DynObj.setValueOpt shape "yref"
Y0 |> DynObj.setValueOpt shape "y0"
Y1 |> DynObj.setValueOpt shape "y1"
Path |> DynObj.setValueOpt shape "path"
Opacity |> DynObj.setValueOpt shape "opacity"
Line |> DynObj.setValueOpt shape "line"
Fillcolor |> DynObj.setValueOpt shape "fillcolor"
Layer |> DynObj.setValueOptBy shape "layer" StyleParam.Layer.toString
// out ->
shape
)