Skip to content

Commit 471fc19

Browse files
authored
fix: issue620 Updated referenced versions (#621)
1 parent f51c7e0 commit 471fc19

File tree

4 files changed

+14
-17
lines changed

4 files changed

+14
-17
lines changed

Sources/Terminal/AngouriMath.Terminal.Lib/FSharpInteractive.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ JsonFSharpConverter () |> options.Converters.Add
2323
let private objectEncode (o : obj) =
2424
match o with
2525
| :? ILatexiseable as latexiseable ->
26-
let toSerialize = LatexSuccess (latexiseable.Latexise (), o.ToString ())
26+
let toSerialize = LatexSuccess (latexiseable.Latexise (), string o)
2727
EncodingLatexPrefix + JsonSerializer.Serialize(toSerialize, options)
2828
| _ ->
29-
let toSerialize = PlainTextSuccess (o.ToString ())
29+
let toSerialize = PlainTextSuccess (string o)
3030
EncodingPlainPrefix + JsonSerializer.Serialize(toSerialize, options)
3131

3232

3333
let private objectDecode (s : string Option) =
3434
match s with
3535
| None -> VoidSuccess
3636
| Some plain when plain.StartsWith EncodingPlainPrefix ->
37-
JsonSerializer.Deserialize<ExecutionResult> (plain.[EncodingPlainPrefix.Length..], options)
37+
JsonSerializer.Deserialize<ExecutionResult> (plain.[EncodingPlainPrefix.Length..], options) |> nonNull
3838
| Some latex when latex.StartsWith EncodingLatexPrefix ->
39-
JsonSerializer.Deserialize<ExecutionResult> (latex.[EncodingLatexPrefix.Length..], options)
39+
JsonSerializer.Deserialize<ExecutionResult> (latex.[EncodingLatexPrefix.Length..], options) |> nonNull
4040
| _ -> VoidSuccess
4141

4242
let execute (kernel : FSharpKernel) code =
@@ -82,7 +82,7 @@ let createKernel () =
8282
|> Chart.withSize (1200., 900.)
8383
|> Chart.show
8484
"Showing in the browser")
85-
|> (fun f -> Func<GenericChart.GenericChart, string> f)
85+
|> (fun f -> Func<GenericChart, string> f)
8686
|> (fun f ->
87-
Formatter.Register<GenericChart.GenericChart> (f, "text/plain"))
87+
Formatter.Register<GenericChart> (f, "text/plain"))
8888
}

Sources/Wrappers/AngouriMath.Interactive/AngouriMath.Interactive.fsproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040

4141
<ItemGroup>
4242
<PackageReference Include="AngouriMath.FSharp" Version="1.4.0-preview.3" />
43-
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.25323.1" />
44-
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.25323.1" />
45-
<PackageReference Include="Plotly.NET" Version="2.0.0-preview.16" />
43+
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.23611.1" />
44+
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.23611.1" />
45+
<PackageReference Include="Plotly.NET" Version="6.0.0-preview.1" />
4646
</ItemGroup>
4747

4848
<ItemGroup>
@@ -51,5 +51,4 @@
5151
<PackagePath>interactive-extensions/dotnet</PackagePath>
5252
</None>
5353
</ItemGroup>
54-
5554
</Project>

Sources/Wrappers/AngouriMath.Interactive/KernelExtension.fs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open System.Threading.Tasks
77
open PeterO.Numbers
88
open System
99
open Plotly.NET
10-
open Plotly.NET.GenericChart
10+
open type Plotly.NET.GenericChart
1111
open AngouriMath.FSharp.Functions
1212

1313
type KernelExtension() =
@@ -43,8 +43,6 @@ type KernelExtension() =
4343
Formatter.SetPreferredMimeTypesFor(typeof<GenericChart>, "text/html")
4444
Formatter.Register<GenericChart> (toChartHTML, "text/html")
4545

46-
47-
4846
interface IKernelExtension with
4947
member _.OnLoadAsync _ =
5048
KernelExtension.applyMagic()

Sources/Wrappers/AngouriMath.Interactive/Plot.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ let private castAs<'a, 'b when 'a : not null> (a : 'a) : 'b =
187187
let up : obj = a :> obj
188188
up :?> 'b
189189

190-
let private withSliderND<'a, 'b> n (chartPlotter : 'a -> obj -> GenericChart.GenericChart) (ranges : 'a) (paramRange : double seq) (param : obj) (func : obj) =
190+
let private withSliderND<'a, 'b> n (chartPlotter : 'a -> obj -> GenericChart) (ranges : 'a) (paramRange : double seq) (param : obj) (func : obj) =
191191
let var = symbol param
192192
let compiled =
193193
match n with
@@ -210,7 +210,7 @@ let private withSliderND<'a, 'b> n (chartPlotter : 'a -> obj -> GenericChart.Gen
210210
|> Seq.map (fun step ->
211211
let newFunc = compiled step
212212
chartPlotter ranges newFunc
213-
|> Chart.withTraceName(Visible = if step = Seq.head paramRange then StyleParam.Visible.True else StyleParam.Visible.False)
213+
|> Chart.withTraceInfo(Visible = if step = Seq.head paramRange then StyleParam.Visible.True else StyleParam.Visible.False)
214214
)
215215
|> GenericChart.combine
216216
let slider = getSlider paramRange
@@ -219,10 +219,10 @@ let private withSliderND<'a, 'b> n (chartPlotter : 'a -> obj -> GenericChart.Gen
219219
|> Chart.withSlider slider
220220
|> withTransparency
221221

222-
let withSlider2D (chartPlotter : double seq -> obj -> GenericChart.GenericChart) (range : double seq) (paramRange : double seq) (param : obj) (func : obj) =
222+
let withSlider2D (chartPlotter : double seq -> obj -> GenericChart) (range : double seq) (paramRange : double seq) (param : obj) (func : obj) =
223223
withSliderND<double seq, double> 1 chartPlotter range paramRange param func
224224

225-
let withSlider3D (chartPlotter : double seq -> double seq -> obj -> GenericChart.GenericChart) (range1 : double seq) (range2 : double seq) (paramRange : double seq) (param : obj) (func : obj) =
225+
let withSlider3D (chartPlotter : double seq -> double seq -> obj -> GenericChart) (range1 : double seq) (range2 : double seq) (paramRange : double seq) (param : obj) (func : obj) =
226226
withSliderND<double seq * double seq, (double * double)> 2 (fun (r1, r2) f -> chartPlotter r1 r2 f) (range1, range2) paramRange param func
227227

228228
let linear (range : double seq) (func : obj) =

0 commit comments

Comments
 (0)