Skip to content

Commit c1704d8

Browse files
committed
Use new DisplayOptions functions to use requirejs with the Global plotlyjs version in Plotly.NET.Interactive
1 parent 57e0b26 commit c1704d8

File tree

3 files changed

+67
-73
lines changed

3 files changed

+67
-73
lines changed

src/Plotly.NET.Interactive/Formatters.fs

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ module Formatters =
77

88
/// Converts a GenericChart to it's HTML representation and embeds it in a div element, together with the chart description for display in notebook environments.
99
let toInteractiveHTML gChart =
10-
toChartHTML gChart
10+
gChart
11+
|> Chart.withDisplayOptionsStyle(PlotlyJSReference = Require $"https://cdn.plot.ly/plotly-{Globals.PLOTLYJS_VERSION}.min")
12+
|> GenericChart.toChartHTML

src/Plotly.NET.Interactive/Plotly.NET.Interactive.fsproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
</ItemGroup>
5050

5151
<ItemGroup>
52-
<PackageReference Include="Plotly.NET" Version="4.0.0-preview.2" />
52+
<ProjectReference Include="..\Plotly.NET\Plotly.NET.fsproj"/>
53+
<!--<PackageReference Include="Plotly.NET" Version="4.0.0-preview.2" />-->
5354
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.23102.2" />
5455
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.23102.2" />
5556
</ItemGroup>

0 commit comments

Comments
 (0)