@@ -26,35 +26,39 @@ module ChartExtensions =
26
26
27
27
/// Set the name related properties of a trace
28
28
[<CompiledName( " WithTraceName" ) >]
29
- static member withTraceName (
29
+ static member withTraceName
30
+ (
30
31
[<Optional; DefaultParameterValue( null ) >] ? Name ,
31
32
[<Optional; DefaultParameterValue( null ) >] ? Showlegend ,
32
33
[<Optional; DefaultParameterValue( null ) >] ? Legendgroup ,
33
- [<Optional; DefaultParameterValue( null ) >] ? Visible ) =
34
- ( fun ( ch : GenericChart ) ->
35
- ch |> mapiTrace ( fun i trace ->
36
- let naming i name = name |> Option.map ( fun v -> if i = 0 then v else sprintf " %s _%i " v i)
37
- trace
38
- |> TraceStyle.TraceInfo( ?Name=( naming i Name),? Showlegend= Showlegend,? Legendgroup= Legendgroup,? Visible= Visible)
39
- )
40
- )
34
+ [<Optional; DefaultParameterValue( null ) >] ? Visible
35
+ ) =
36
+ fun ( ch : GenericChart ) ->
37
+ ch |> mapiTrace ( fun i trace ->
38
+ let naming i name = name |> Option.map ( fun v -> if i = 0 then v else sprintf " %s _%i " v i)
39
+ trace
40
+ |> TraceStyle.TraceInfo( ?Name=( naming i Name),? Showlegend= Showlegend,? Legendgroup= Legendgroup,? Visible= Visible)
41
+ )
42
+
41
43
42
44
/// Set the axis anchor id the trace is belonging to
43
45
[<CompiledName( " WithAxisAnchor" ) >]
44
- static member withAxisAnchor (
46
+ static member withAxisAnchor
47
+ (
45
48
[<Optional; DefaultParameterValue( null ) >] ? X ,
46
49
[<Optional; DefaultParameterValue( null ) >] ? Y ,
47
- [<Optional; DefaultParameterValue( null ) >] ? Z ) =
48
- let idx = if X.IsSome then Some ( StyleParam.AxisAnchorId.X X.Value) else None
49
- let idy = if Y.IsSome then Some ( StyleParam.AxisAnchorId.Y Y.Value) else None
50
- let idz = if Z.IsSome then Some ( StyleParam.AxisAnchorId.Z Z.Value) else None
50
+ [<Optional; DefaultParameterValue( null ) >] ? Z
51
+ ) =
52
+ let idx = if X.IsSome then Some ( StyleParam.AxisAnchorId.X X.Value) else None
53
+ let idy = if Y.IsSome then Some ( StyleParam.AxisAnchorId.Y Y.Value) else None
54
+ let idz = if Z.IsSome then Some ( StyleParam.AxisAnchorId.Z Z.Value) else None
51
55
52
- ( fun ( ch : GenericChart ) ->
53
- ch |> mapTrace ( fun trace ->
54
- trace
55
- |> TraceStyle.SetAxisAnchor( ?X= idx,? Y= idy,? Z= idz)
56
- )
57
- )
56
+ fun ( ch : GenericChart ) ->
57
+ ch |> mapTrace ( fun trace ->
58
+ trace
59
+ |> TraceStyle.SetAxisAnchor( ?X= idx,? Y= idy,? Z= idz)
60
+ )
61
+
58
62
59
63
/// Apply styling to the Marker(s) of the chart as Object.
60
64
[<CompiledName( " WithMarker" ) >]
@@ -65,16 +69,18 @@ module ChartExtensions =
65
69
66
70
/// Apply styling to the Marker(s) of the chart.
67
71
[<CompiledName( " WithMarkerStyle" ) >]
68
- static member withMarkerStyle (
72
+ static member withMarkerStyle
73
+ (
69
74
[<Optional; DefaultParameterValue( null ) >] ? Size ,
70
75
[<Optional; DefaultParameterValue( null ) >] ? Color ,
71
76
[<Optional; DefaultParameterValue( null ) >] ? Symbol ,
72
- [<Optional; DefaultParameterValue( null ) >] ? Opacity ) =
73
- let marker =
74
- Marker.init (
75
- ?Size= Size,? Color= Color,? Symbol= Symbol,? Opacity= Opacity
76
- )
77
- Chart.withMarker( marker)
77
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity
78
+ ) =
79
+ let marker =
80
+ Marker.init (
81
+ ?Size= Size,? Color= Color,? Symbol= Symbol,? Opacity= Opacity
82
+ )
83
+ Chart.withMarker( marker)
78
84
79
85
/// Apply styling to the Line(s) of the chart as Object.
80
86
[<CompiledName( " WithLine" ) >]
@@ -85,18 +91,20 @@ module ChartExtensions =
85
91
86
92
/// Apply styling to the Line(s) of the chart.
87
93
[<CompiledName( " WithLineStyle" ) >]
88
- static member withLineStyle (
94
+ static member withLineStyle
95
+ (
89
96
[<Optional; DefaultParameterValue( null ) >] ? Width ,
90
97
[<Optional; DefaultParameterValue( null ) >] ? Color ,
91
98
[<Optional; DefaultParameterValue( null ) >] ? Shape ,
92
99
[<Optional; DefaultParameterValue( null ) >] ? Dash ,
93
100
[<Optional; DefaultParameterValue( null ) >] ? Smoothing ,
94
- [<Optional; DefaultParameterValue( null ) >] ? Colorscale ) =
95
- let line =
96
- Line.init (
97
- ?Width= Width,? Color= Color,? Shape= Shape,? Dash= Dash,? Smoothing= Smoothing,? Colorscale= Colorscale)
101
+ [<Optional; DefaultParameterValue( null ) >] ? Colorscale
102
+ ) =
103
+ let line =
104
+ Line.init (
105
+ ?Width= Width,? Color= Color,? Shape= Shape,? Dash= Dash,? Smoothing= Smoothing,? Colorscale= Colorscale)
98
106
99
- Chart.withLine( line)
107
+ Chart.withLine( line)
100
108
101
109
/// Apply styling to the xError(s) of the chart as Object
102
110
[<CompiledName( " WithXError" ) >]
@@ -107,15 +115,17 @@ module ChartExtensions =
107
115
108
116
/// Apply styling to the xError(s) of the chart as Object
109
117
[<CompiledName( " WithXErrorStyle" ) >]
110
- static member withXErrorStyle (
118
+ static member withXErrorStyle
119
+ (
111
120
[<Optional; DefaultParameterValue( null ) >] ? Array ,
112
121
[<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
113
122
[<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
114
123
[<Optional; DefaultParameterValue( null ) >] ? Color ,
115
124
[<Optional; DefaultParameterValue( null ) >] ? Thickness ,
116
- [<Optional; DefaultParameterValue( null ) >] ? Width ) =
117
- let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
118
- Chart.withXError error
125
+ [<Optional; DefaultParameterValue( null ) >] ? Width
126
+ ) =
127
+ let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
128
+ Chart.withXError error
119
129
120
130
/// Apply styling to the yError(s) of the chart as Object
121
131
[<CompiledName( " WithYError" ) >]
@@ -126,15 +136,17 @@ module ChartExtensions =
126
136
127
137
/// Apply styling to the yError(s) of the chart as Object
128
138
[<CompiledName( " WithYErrorStyle" ) >]
129
- static member withYErrorStyle (
139
+ static member withYErrorStyle
140
+ (
130
141
[<Optional; DefaultParameterValue( null ) >] ? Array ,
131
142
[<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
132
143
[<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
133
144
[<Optional; DefaultParameterValue( null ) >] ? Color ,
134
145
[<Optional; DefaultParameterValue( null ) >] ? Thickness ,
135
- [<Optional; DefaultParameterValue( null ) >] ? Width ) =
136
- let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
137
- Chart.withYError error
146
+ [<Optional; DefaultParameterValue( null ) >] ? Width
147
+ ) =
148
+ let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
149
+ Chart.withYError error
138
150
139
151
/// Apply styling to the zError(s) of the chart as Object
140
152
[<CompiledName( " WithZError" ) >]
@@ -145,15 +157,17 @@ module ChartExtensions =
145
157
146
158
/// Apply styling to the zError(s) of the chart as Object
147
159
[<CompiledName( " WithZErrorStyle" ) >]
148
- static member withZErrorStyle (
160
+ static member withZErrorStyle
161
+ (
149
162
[<Optional; DefaultParameterValue( null ) >] ? Array ,
150
163
[<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
151
164
[<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
152
165
[<Optional; DefaultParameterValue( null ) >] ? Color ,
153
166
[<Optional; DefaultParameterValue( null ) >] ? Thickness ,
154
- [<Optional; DefaultParameterValue( null ) >] ? Width ) =
155
- let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
156
- Chart.withZError error
167
+ [<Optional; DefaultParameterValue( null ) >] ? Width
168
+ ) =
169
+ let error = Error.init( ?Array= Array,? Arrayminus= Arrayminus,? Symmetric= Symmetric,? Color= Color,? Thickness= Thickness,? Width= Width)
170
+ Chart.withZError error
157
171
158
172
159
173
// ############################################################
@@ -369,13 +383,15 @@ module ChartExtensions =
369
383
370
384
// Set the margin of a Chart
371
385
[<CompiledName( " WithMarginSize" ) >]
372
- static member withMarginSize (
373
- [<Optional; DefaultParameterValue( null ) >] ? Left ,
374
- [<Optional; DefaultParameterValue( null ) >] ? Right ,
375
- [<Optional; DefaultParameterValue( null ) >] ? Top ,
376
- [<Optional; DefaultParameterValue( null ) >] ? Bottom ,
377
- [<Optional; DefaultParameterValue( null ) >] ? Pad ,
378
- [<Optional; DefaultParameterValue( null ) >] ? Autoexpand ) =
386
+ static member withMarginSize
387
+ (
388
+ [<Optional; DefaultParameterValue( null ) >] ? Left ,
389
+ [<Optional; DefaultParameterValue( null ) >] ? Right ,
390
+ [<Optional; DefaultParameterValue( null ) >] ? Top ,
391
+ [<Optional; DefaultParameterValue( null ) >] ? Bottom ,
392
+ [<Optional; DefaultParameterValue( null ) >] ? Pad ,
393
+ [<Optional; DefaultParameterValue( null ) >] ? Autoexpand
394
+ ) =
379
395
let margin =
380
396
Margin.init ( ?Left= Left,? Right= Right,? Top= Top,? Bottom= Bottom,? Pad= Pad,? Autoexpand= Autoexpand )
381
397
Chart.withMargin( margin)
0 commit comments