@@ -26,35 +26,39 @@ module ChartExtensions =
2626
2727 /// Set the name related properties of a trace
2828 [<CompiledName( " WithTraceName" ) >]
29- static member withTraceName (
29+ static member withTraceName
30+ (
3031 [<Optional; DefaultParameterValue( null ) >] ? Name ,
3132 [<Optional; DefaultParameterValue( null ) >] ? Showlegend ,
3233 [<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+
4143
4244 /// Set the axis anchor id the trace is belonging to
4345 [<CompiledName( " WithAxisAnchor" ) >]
44- static member withAxisAnchor (
46+ static member withAxisAnchor
47+ (
4548 [<Optional; DefaultParameterValue( null ) >] ? X ,
4649 [<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
5155
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+
5862
5963 /// Apply styling to the Marker(s) of the chart as Object.
6064 [<CompiledName( " WithMarker" ) >]
@@ -65,16 +69,18 @@ module ChartExtensions =
6569
6670 /// Apply styling to the Marker(s) of the chart.
6771 [<CompiledName( " WithMarkerStyle" ) >]
68- static member withMarkerStyle (
72+ static member withMarkerStyle
73+ (
6974 [<Optional; DefaultParameterValue( null ) >] ? Size ,
7075 [<Optional; DefaultParameterValue( null ) >] ? Color ,
7176 [<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)
7884
7985 /// Apply styling to the Line(s) of the chart as Object.
8086 [<CompiledName( " WithLine" ) >]
@@ -85,18 +91,20 @@ module ChartExtensions =
8591
8692 /// Apply styling to the Line(s) of the chart.
8793 [<CompiledName( " WithLineStyle" ) >]
88- static member withLineStyle (
94+ static member withLineStyle
95+ (
8996 [<Optional; DefaultParameterValue( null ) >] ? Width ,
9097 [<Optional; DefaultParameterValue( null ) >] ? Color ,
9198 [<Optional; DefaultParameterValue( null ) >] ? Shape ,
9299 [<Optional; DefaultParameterValue( null ) >] ? Dash ,
93100 [<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)
98106
99- Chart.withLine( line)
107+ Chart.withLine( line)
100108
101109 /// Apply styling to the xError(s) of the chart as Object
102110 [<CompiledName( " WithXError" ) >]
@@ -107,15 +115,17 @@ module ChartExtensions =
107115
108116 /// Apply styling to the xError(s) of the chart as Object
109117 [<CompiledName( " WithXErrorStyle" ) >]
110- static member withXErrorStyle (
118+ static member withXErrorStyle
119+ (
111120 [<Optional; DefaultParameterValue( null ) >] ? Array ,
112121 [<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
113122 [<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
114123 [<Optional; DefaultParameterValue( null ) >] ? Color ,
115124 [<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
119129
120130 /// Apply styling to the yError(s) of the chart as Object
121131 [<CompiledName( " WithYError" ) >]
@@ -126,15 +136,17 @@ module ChartExtensions =
126136
127137 /// Apply styling to the yError(s) of the chart as Object
128138 [<CompiledName( " WithYErrorStyle" ) >]
129- static member withYErrorStyle (
139+ static member withYErrorStyle
140+ (
130141 [<Optional; DefaultParameterValue( null ) >] ? Array ,
131142 [<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
132143 [<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
133144 [<Optional; DefaultParameterValue( null ) >] ? Color ,
134145 [<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
138150
139151 /// Apply styling to the zError(s) of the chart as Object
140152 [<CompiledName( " WithZError" ) >]
@@ -145,15 +157,17 @@ module ChartExtensions =
145157
146158 /// Apply styling to the zError(s) of the chart as Object
147159 [<CompiledName( " WithZErrorStyle" ) >]
148- static member withZErrorStyle (
160+ static member withZErrorStyle
161+ (
149162 [<Optional; DefaultParameterValue( null ) >] ? Array ,
150163 [<Optional; DefaultParameterValue( null ) >] ? Arrayminus ,
151164 [<Optional; DefaultParameterValue( null ) >] ? Symmetric ,
152165 [<Optional; DefaultParameterValue( null ) >] ? Color ,
153166 [<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
157171
158172
159173// ############################################################
@@ -369,13 +383,15 @@ module ChartExtensions =
369383
370384 // Set the margin of a Chart
371385 [<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+ ) =
379395 let margin =
380396 Margin.init ( ?Left= Left,? Right= Right,? Top= Top,? Bottom= Bottom,? Pad= Pad,? Autoexpand= Autoexpand )
381397 Chart.withMargin( margin)
0 commit comments