@@ -7,6 +7,7 @@ open System.IO
77open GenericChart
88open Trace
99open Trace3d
10+ open StyleParam
1011
1112
1213// ###########
@@ -74,7 +75,7 @@ type Chart =
7475 let isShowMarker =
7576 match ShowMarkers with
7677 | Some isShow -> isShow
77- | None -> false
78+ | Option. None -> false
7879 StyleParam.ModeUtils.showText ( TextPosition.IsSome || TextFont.IsSome)
7980 >> StyleParam.ModeUtils.showMarker ( isShowMarker)
8081
@@ -97,7 +98,7 @@ type Chart =
9798 let isShowMarker =
9899 match ShowMarkers with
99100 | Some isShow -> isShow
100- | None -> false
101+ | Option. None -> false
101102 StyleParam.ModeUtils.showText ( TextPosition.IsSome || TextFont.IsSome)
102103 >> StyleParam.ModeUtils.showMarker ( isShowMarker)
103104
@@ -142,7 +143,7 @@ type Chart =
142143 let isShowMarker =
143144 match ShowMarkers with
144145 | Some isShow -> isShow
145- | None -> false
146+ | Option. None -> false
146147 StyleParam.ModeUtils.showText ( TextPosition.IsSome || TextFont.IsSome)
147148 >> StyleParam.ModeUtils.showMarker ( isShowMarker)
148149
@@ -185,7 +186,7 @@ type Chart =
185186 let isShowMarker =
186187 match ShowMarkers with
187188 | Some isShow -> isShow
188- | None -> false
189+ | Option. None -> false
189190 StyleParam.ModeUtils.showText ( TextPosition.IsSome || TextFont.IsSome)
190191 >> StyleParam.ModeUtils.showMarker ( isShowMarker)
191192
@@ -211,7 +212,7 @@ type Chart =
211212 let isShowMarker =
212213 match ShowMarkers with
213214 | Some isShow -> isShow
214- | None -> false
215+ | Option. None -> false
215216 StyleParam.ModeUtils.showText ( TextPosition.IsSome || TextFont.IsSome)
216217 >> StyleParam.ModeUtils.showMarker ( isShowMarker)
217218
@@ -235,7 +236,7 @@ type Chart =
235236 let marker =
236237 match Marker with
237238 | Some marker -> marker |> FSharp.Plotly.Marker.style( ?Color= Color)
238- | None -> FSharp.Plotly.Marker.init ( ?Color= Color)
239+ | Option. None -> FSharp.Plotly.Marker.init ( ?Color= Color)
239240
240241 Trace.initBar ( TraceStyle.Bar( X = keys, Y = values, Marker= marker))
241242 |> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
@@ -254,7 +255,7 @@ type Chart =
254255 let marker =
255256 match Marker with
256257 | Some marker -> marker |> FSharp.Plotly.Marker.style( ?Color= Color)
257- | None -> FSharp.Plotly.Marker.init ( ?Color= Color)
258+ | Option. None -> FSharp.Plotly.Marker.init ( ?Color= Color)
258259
259260 Trace.initBar ( TraceStyle.Bar( X = keys, Y = values, Marker= marker))
260261 |> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
@@ -274,7 +275,7 @@ type Chart =
274275 let marker =
275276 match Marker with
276277 | Some marker -> marker |> FSharp.Plotly.Marker.style( ?Color= Color)
277- | None -> FSharp.Plotly.Marker.init ( ?Color= Color)
278+ | Option. None -> FSharp.Plotly.Marker.init ( ?Color= Color)
278279 Trace.initBar ( TraceStyle.Bar( X = keys, Y = values, Marker= marker, Orientation = StyleParam.Orientation.Horizontal))
279280 |> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
280281 |> TraceStyle.TextLabel( ?Text= Labels,? Textposition= TextPosition,? Textfont= TextFont)
@@ -292,7 +293,7 @@ type Chart =
292293 let marker =
293294 match Marker with
294295 | Some marker -> marker |> FSharp.Plotly.Marker.style( ?Color= Color)
295- | None -> FSharp.Plotly.Marker.init ( ?Color= Color)
296+ | Option. None -> FSharp.Plotly.Marker.init ( ?Color= Color)
296297 Trace.initBar ( TraceStyle.Bar( X = values, Y = keys, Marker= marker, Orientation = StyleParam.Orientation.Horizontal))
297298 |> TraceStyle.TraceInfo( ?Name= Name,? Showlegend= Showlegend,? Opacity= Opacity)
298299 |> TraceStyle.TextLabel( ?Text= Labels,? Textposition= TextPosition,? Textfont= TextFont)
@@ -432,6 +433,25 @@ type Chart =
432433 //|> TraceStyle.TraceInfo(?Name=Name,?Showlegend=Showlegend,?Opacity=Opacity)
433434 |> GenericChart.ofTraceObject
434435
436+
437+ /// Computes the parallel coordinates plot
438+ static member ParallelCoord ( dims : seq < 'key * #seq < 'values >>,? Ranges : seq < StyleParam.Range option >,? Color ,? Colorscale ,? Width ,? Dash ,? Domain ,? Labelfont ,? Tickfont ,? Rangefont ) =
439+ let dims ' =
440+ if Ranges.IsSome then
441+ Seq.zip dims Ranges.Value
442+ |> Seq.map ( fun (( k , vals ), r ) ->
443+ if r.IsSome then Dimensions.init( values= vals, Label= k, Range= r.Value)
444+ else Dimensions.init( values= vals, Label= k)
445+ )
446+ else
447+ dims |> Seq.map ( fun ( k , vals ) -> Dimensions.init( values= vals, Label= k))
448+ Trace.initParallelCoord (
449+ TraceStyle.ParallelCoord ( Dimensions= dims',? Domain= Domain,? Labelfont= Labelfont,? Tickfont= Tickfont,? Rangefont= Rangefont)
450+ )
451+ |> TraceStyle.Line( ?Width= Width,? Color= Color,? Dash= Dash,? Colorscale= Colorscale)
452+ |> GenericChart.ofTraceObject
453+
454+
435455
436456 // ---------------------------------------------------------------------------------------------------------------------------------------------------
437457 // 3d - Chart --->
0 commit comments