@@ -10,41 +10,6 @@ open System.IO
1010open GenericChart
1111open System.Runtime .InteropServices
1212
13- // Copied from FSharp.Care.Collections to remove dependencies
14- [<AutoOpen>]
15- module internal Seq =
16-
17- /// Splits a sequence of pairs into two sequences
18- let unzip ( input : seq < _ >) =
19- let ( lstA , lstB ) =
20- Seq.foldBack ( fun ( a , b ) ( accA , accB ) -> a :: accA, b :: accB) input ([], [])
21-
22- ( Seq.ofList lstA, Seq.ofList lstB)
23-
24- /// Splits a sequence of triples into three sequences
25- let unzip3 ( input : seq < _ >) =
26- let ( lstA , lstB , lstC ) =
27- Seq.foldBack ( fun ( a , b , c ) ( accA , accB , accC ) -> a :: accA, b :: accB, c :: accC) input ([], [], [])
28-
29- ( Seq.ofList lstA, Seq.ofList lstB, Seq.ofList lstC)
30-
31- [<AutoOpen>]
32- module internal ChartIO =
33-
34- ///Choose process to open plots with depending on OS. Thanks to @zyzhu for hinting at a solution (https://github.com/plotly/Plotly.NET/issues/31)
35- let openOsSpecificFile path =
36- if RuntimeInformation.IsOSPlatform( OSPlatform.Windows) then
37- let psi =
38- new System.Diagnostics.ProcessStartInfo( FileName = path, UseShellExecute = true )
39-
40- System.Diagnostics.Process.Start( psi) |> ignore
41- elif RuntimeInformation.IsOSPlatform( OSPlatform.Linux) then
42- System.Diagnostics.Process.Start( " xdg-open" , path) |> ignore
43- elif RuntimeInformation.IsOSPlatform( OSPlatform.OSX) then
44- System.Diagnostics.Process.Start( " open" , path) |> ignore
45- else
46- invalidOp " Not supported OS platform"
47-
4813/// Provides a set of static methods for creating and styling charts.
4914type Chart =
5015
@@ -135,10 +100,10 @@ type Chart =
135100 /// <summary>
136101 /// Sets the color axis id for the chart's trace(s).
137102 /// </summary>
138- /// <param name="Id ">The new color axis id for the chart's trace(s)</param>
103+ /// <param name="id ">The new color axis id for the chart's trace(s)</param>
139104 [<CompiledName( " WithColorAxisAnchor" ) >]
140- static member withColorAxisAnchor ( [<Optional ; DefaultParameterValue ( null ) >] ? Id : int ) =
141- fun ( ch : GenericChart ) -> ch |> mapTrace ( TraceStyle .setColorAxisAnchor ( ?ColorAxisId = Id ) )
105+ static member withColorAxisAnchor ( id : int ) =
106+ fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace .setColorAxisAnchor id )
142107
143108 /// <summary>
144109 /// Sets the marker for the chart's trace(s).
@@ -310,7 +275,7 @@ type Chart =
310275 /// Apply styling to the xError(s) of the chart as Object
311276 [<CompiledName( " WithXError" ) >]
312277 static member withXError ( xError : Error ) =
313- ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.SetXError ( xError)))
278+ ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.setXError ( xError)))
314279
315280 /// Apply styling to the xError(s) of the chart as Object
316281 [<CompiledName( " WithXErrorStyle" ) >]
@@ -338,7 +303,7 @@ type Chart =
338303 /// Apply styling to the yError(s) of the chart as Object
339304 [<CompiledName( " WithYError" ) >]
340305 static member withYError ( yError : Error ) =
341- ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.SetYError ( yError)))
306+ ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.setYError ( yError)))
342307
343308 /// Apply styling to the yError(s) of the chart as Object
344309 [<CompiledName( " WithYErrorStyle" ) >]
@@ -366,7 +331,7 @@ type Chart =
366331 /// Apply styling to the zError(s) of the chart as Object
367332 [<CompiledName( " WithZError" ) >]
368333 static member withZError ( zError : Error ) =
369- ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.SetZError ( zError)))
334+ ( fun ( ch : GenericChart ) -> ch |> mapTrace ( Trace.setZError ( zError)))
370335
371336 /// Apply styling to the zError(s) of the chart as Object
372337 [<CompiledName( " WithZErrorStyle" ) >]
@@ -759,39 +724,6 @@ type Chart =
759724 )
760725
761726 Chart.withColorBar ( colorbar)
762- //// Sets second x-Axis of 2D- Charts
763- //static member withX_Axis2(xAxis2:Axis.LinearAxis) =
764- // (fun (ch:GenericChart) ->
765- // let layout =
766- // GenericChart.getLayout ch
767- // |> Layout.style (xAxis2=xAxis2)
768- // GenericChart.setLayout layout ch
769- // )
770-
771-
772- // // Sets second x-Axis of 2D- Charts
773- //static member withX_Axis2Style(title,?MinMax,?Showgrid,?Showline) =
774- // let range = if MinMax.IsSome then Some (StyleParam.Range.MinMax (MinMax.Value)) else None
775- // let xaxis = Axis.LinearAxis.init(Title=title,?Range=range,?Showgrid=Showgrid,?Showline=Showline,Side=StyleParam.Side.Top)
776- // Chart.withX_Axis2(xaxis)
777-
778-
779- //// Sets second y-Axis of 2D- Charts
780- //static member withY_Axis2(yAxis2:Axis.LinearAxis) =
781- // (fun (ch:GenericChart) ->
782- // let layout =
783- // GenericChart.getLayout ch
784- // |> Layout.style (yAxis2=yAxis2)
785- // GenericChart.setLayout layout ch
786- // )
787-
788-
789- // // Sets second x-Axis of 2D- Charts
790- //static member withY_Axis2Style(title,?MinMax,?Showgrid,?Showline) =
791- // let range = if MinMax.IsSome then Some (StyleParam.Range.MinMax (MinMax.Value)) else None
792- // let yaxis = Axis.LinearAxis.init(Title=title,?Range=range,?Showgrid=Showgrid,?Showline=Showline,Side=StyleParam.Side.Right)
793- // Chart.withY_Axis2(yaxis)
794-
795727
796728 // Set the Layout of a Chart
797729 [<CompiledName( " WithLayout" ) >]
0 commit comments