Skip to content

Commit 9491ce7

Browse files
committed
Fix notebook display ommitting chart description
1 parent b0ad27d commit 9491ce7

File tree

9 files changed

+192
-224
lines changed

9 files changed

+192
-224
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,6 @@ temp/gh-pages
193193

194194
# Jupyter notebooks checkpoints
195195
**/.ipynb_checkpoints/**
196+
/plotly-net-gource.gif
197+
/plotly-gource.x264.avi
198+
/plotly-gource.ppm

src/Plotly.NET.Interactive/AssemblyInfo.fs

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
namespace Plotly.NET.Interactive
2-
32
open System
43
open System.Threading.Tasks
54
open Microsoft.DotNet.Interactive
65
open Microsoft.DotNet.Interactive.Formatting
6+
open Plotly.NET
77
open Plotly.NET.GenericChart
88

99
type FormatterKernelExtension() =
1010

11-
let registerFormatter () =
12-
Formatter.Register<GenericChart>(
13-
Action<_, _> (fun chart (writer: IO.TextWriter) ->
14-
let html = toChartHTML chart
15-
writer.Write(html)),
16-
HtmlFormatter.MimeType
17-
)
18-
1911
interface IKernelExtension with
2012
member _.OnLoadAsync _ =
21-
registerFormatter ()
13+
14+
Formatter.Register<GenericChart>(
15+
Action<_, _> (fun chart (writer: IO.TextWriter) -> writer.Write(Formatters.toInteractiveHTML chart)),
16+
"text/html"
17+
)
18+
2219
Task.CompletedTask

src/Plotly.NET.Interactive/ExtensionVisualTest.ipynb

Lines changed: 0 additions & 174 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace Plotly.NET.Interactive
2+
3+
open Plotly.NET
4+
open Plotly.NET.GenericChart
5+
6+
module Formatters =
7+
8+
let interactiveDoc = """
9+
<div>
10+
[CHART]
11+
[DESCRIPTION]
12+
</div
13+
"""
14+
15+
/// 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.
16+
let toInteractiveHTML gChart =
17+
let chartMarkup = toChartHTML gChart
18+
let displayOpts = getDisplayOptions gChart
19+
20+
interactiveDoc.Replace("[CHART]", chartMarkup) |> DisplayOptions.replaceHtmlPlaceholders displayOpts

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,31 @@
2828
<FsDocsLicenseLink>https://github.com/plotly/Plotly.NET/blob/dev/LICENSE</FsDocsLicenseLink>
2929
<FsDocsReleaseNotesLink>https://github.com/plotly/Plotly.NET/blob/dev/RELEASE_NOTES.md</FsDocsReleaseNotesLink>
3030
</PropertyGroup>
31-
31+
3232
<ItemGroup>
33-
<None Include="Repack.ps1" />
34-
<None Include="..\..\docs\img\logo.png" Pack="true" PackagePath="\" />
35-
<None Include="..\..\bin\Plotly.NET.Interactive\netstandard2.1\Plotly.NET.Interactive.dll" Pack="true" PackagePath="interactive-extensions/dotnet" />
36-
<Compile Include="AssemblyInfo.fs" />
37-
<Compile Include="Extension.fs" />
33+
<ProjectReference Include="..\Plotly.NET\Plotly.NET.fsproj" />
3834
</ItemGroup>
3935

4036
<ItemGroup>
4137
<Compile Remove="bin\**" />
4238
<EmbeddedResource Remove="bin\**" />
4339
<None Remove="bin\**" />
4440
</ItemGroup>
41+
42+
<ItemGroup>
43+
<Compile Include="Formatters.fs" />
44+
<Compile Include="Extension.fs" />
45+
</ItemGroup>
4546

4647
<ItemGroup>
47-
<ProjectReference Include="..\Plotly.NET\Plotly.NET.fsproj" />
48+
<None Include="..\..\docs\img\logo.png" Pack="true" PackagePath="\" />
49+
<None Include="$(OutputPath)/Plotly.NET.Interactive.dll" Pack="true" PackagePath="interactive-extensions/dotnet" />
4850
</ItemGroup>
4951

52+
5053
<ItemGroup>
51-
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.21606.1" />
52-
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.21606.1" />
54+
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.22175.2" />
55+
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.22175.2" />
5356
</ItemGroup>
5457

5558
</Project>

src/Plotly.NET.Interactive/Repack.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Remove-Item -Recurse ~\.nuget\packages\plotly.net* -Force
55

66
# build and pack Plotly.NET.Interactive
77
cd ../../
8-
dotnet tool restore
9-
dotnet fake build
10-
dotnet pack -c Release -p:PackageVersion=0.0.0-dev -o "./pkg"
8+
./build.cmd
9+
dotnet pack -c Release -p:PackageVersion=0.0.1-dev -o "./pkg"
1110
cd src/Plotly.NET.Interactive

src/Plotly.NET.Interactive/TestNotebook.dib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ The version of the package is always `0.0.0-dev`.
1717
open Plotly.NET
1818

1919
Chart.Point([1,2])
20+
|> Chart.withDe
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"To reproduce the package, run `./Repack.ps1` in powershell. It will clean your cache in `~/.nuget/packages` and pack the library to `Plotly.NET/pkg` folder, which you should specify below (absolute paths only) in `#i` line.\n",
8+
"\n",
9+
"The version of the package is always `0.0.0-dev`."
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {
16+
"dotnet_interactive": {
17+
"language": "fsharp"
18+
},
19+
"vscode": {
20+
"languageId": "dotnet-interactive.fsharp"
21+
}
22+
},
23+
"outputs": [
24+
{
25+
"data": {
26+
"text/html": [
27+
"<div><div><strong>Restore sources</strong><ul><li><span> C:/Users/schne/source/repos/plotly/Plotly.NET/pkg</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Plotly.NET, 0.0.1-dev</span></li><li><span>Plotly.NET.ImageExport, 0.0.1-dev</span></li><li><span>Plotly.NET.Interactive, 0.0.1-dev</span></li></ul></div></div>"
28+
]
29+
},
30+
"metadata": {},
31+
"output_type": "display_data"
32+
},
33+
{
34+
"data": {
35+
"text/markdown": [
36+
"Loading extensions from `Plotly.NET.Interactive.dll`"
37+
]
38+
},
39+
"metadata": {},
40+
"output_type": "display_data"
41+
}
42+
],
43+
"source": [
44+
"// be advised, that you always should set absolute paths for local nuget packages - change this to reflect your own setup\n",
45+
"#i \"nuget: C:/Users/schne/source/repos/plotly/Plotly.NET/pkg\"\n",
46+
"#r \"nuget: Plotly.NET, 0.0.1-dev\"\n",
47+
"#r \"nuget: Plotly.NET.ImageExport, 0.0.1-dev\"\n",
48+
"#r \"nuget: Plotly.NET.Interactive, 0.0.1-dev\""
49+
]
50+
},
51+
{
52+
"cell_type": "code",
53+
"execution_count": null,
54+
"metadata": {
55+
"dotnet_interactive": {
56+
"language": "fsharp"
57+
},
58+
"vscode": {
59+
"languageId": "dotnet-interactive.fsharp"
60+
}
61+
},
62+
"outputs": [
63+
{
64+
"data": {
65+
"text/html": [
66+
"\r\n",
67+
"<div>\r\n",
68+
" <div id=\"840d7c5e-a3a2-4964-ab50-2a5880783536\"><!-- Plotly chart will be drawn inside this DIV --></div>\r\n",
69+
"<script type=\"text/javascript\">\r\n",
70+
"\r\n",
71+
" var renderPlotly_840d7c5ea3a24964ab502a5880783536 = function() {\r\n",
72+
" var fsharpPlotlyRequire = requirejs.config({context:'fsharp-plotly',paths:{plotly:'https://cdn.plot.ly/plotly-2.6.3.min'}}) || require;\r\n",
73+
" fsharpPlotlyRequire(['plotly'], function(Plotly) {\r\n",
74+
"\r\n",
75+
" var data = [{\"type\":\"scatter\",\"mode\":\"markers\",\"x\":[1],\"y\":[2],\"marker\":{},\"line\":{}}];\r\n",
76+
" var layout = {\"width\":600,\"height\":600,\"template\":{\"layout\":{\"title\":{\"x\":0.05},\"font\":{\"color\":\"rgba(42, 63, 95, 1.0)\"},\"paper_bgcolor\":\"rgba(255, 255, 255, 1.0)\",\"plot_bgcolor\":\"rgba(229, 236, 246, 1.0)\",\"autotypenumbers\":\"strict\",\"colorscale\":{\"diverging\":[[0.0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1.0,\"#276419\"]],\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}},\"geo\":{\"showland\":true,\"landcolor\":\"rgba(229, 236, 246, 1.0)\",\"showlakes\":true,\"lakecolor\":\"rgba(255, 255, 255, 1.0)\",\"subunitcolor\":\"rgba(255, 255, 255, 1.0)\",\"bgcolor\":\"rgba(255, 255, 255, 1.0)\"},\"mapbox\":{\"style\":\"light\"},\"polar\":{\"bgcolor\":\"rgba(229, 236, 246, 1.0)\",\"radialaxis\":{\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"ticks\":\"\"},\"angularaxis\":{\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"ticks\":\"\"}},\"scene\":{\"xaxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"gridwidth\":2.0,\"zerolinecolor\":\"rgba(255, 255, 255, 1.0)\",\"backgroundcolor\":\"rgba(229, 236, 246, 1.0)\",\"showbackground\":true},\"yaxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"gridwidth\":2.0,\"zerolinecolor\":\"rgba(255, 255, 255, 1.0)\",\"backgroundcolor\":\"rgba(229, 236, 246, 1.0)\",\"showbackground\":true},\"zaxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"gridwidth\":2.0,\"zerolinecolor\":\"rgba(255, 255, 255, 1.0)\",\"backgroundcolor\":\"rgba(229, 236, 246, 1.0)\",\"showbackground\":true}},\"ternary\":{\"aaxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\"},\"baxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\"},\"caxis\":{\"ticks\":\"\",\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\"},\"bgcolor\":\"rgba(229, 236, 246, 1.0)\"},\"xaxis\":{\"title\":{\"standoff\":15},\"ticks\":\"\",\"automargin\":true,\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"zerolinecolor\":\"rgba(255, 255, 255, 1.0)\",\"zerolinewidth\":2.0},\"yaxis\":{\"title\":{\"standoff\":15},\"ticks\":\"\",\"automargin\":true,\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"zerolinecolor\":\"rgba(255, 255, 255, 1.0)\",\"zerolinewidth\":2.0},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"shapedefaults\":{\"line\":{\"color\":\"rgba(42, 63, 95, 1.0)\"}},\"colorway\":[\"rgba(99, 110, 250, 1.0)\",\"rgba(239, 85, 59, 1.0)\",\"rgba(0, 204, 150, 1.0)\",\"rgba(171, 99, 250, 1.0)\",\"rgba(255, 161, 90, 1.0)\",\"rgba(25, 211, 243, 1.0)\",\"rgba(255, 102, 146, 1.0)\",\"rgba(182, 232, 128, 1.0)\",\"rgba(255, 151, 255, 1.0)\",\"rgba(254, 203, 82, 1.0)\"]},\"data\":{\"bar\":[{\"marker\":{\"line\":{\"color\":\"rgba(229, 236, 246, 1.0)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"error_x\":{\"color\":\"rgba(42, 63, 95, 1.0)\"},\"error_y\":{\"color\":\"rgba(42, 63, 95, 1.0)\"}}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"rgba(229, 236, 246, 1.0)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}}}],\"carpet\":[{\"aaxis\":{\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"endlinecolor\":\"rgba(42, 63, 95, 1.0)\",\"minorgridcolor\":\"rgba(255, 255, 255, 1.0)\",\"startlinecolor\":\"rgba(42, 63, 95, 1.0)\"},\"baxis\":{\"linecolor\":\"rgba(255, 255, 255, 1.0)\",\"gridcolor\":\"rgba(255, 255, 255, 1.0)\",\"endlinecolor\":\"rgba(42, 63, 95, 1.0)\",\"minorgridcolor\":\"rgba(255, 255, 255, 1.0)\",\"startlinecolor\":\"rgba(42, 63, 95, 1.0)\"}}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}}}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"pie\":[{\"automargin\":true}],\"scatter\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}},\"line\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"}}}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0.0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"rgba(235, 240, 248, 1.0)\"},\"line\":{\"color\":\"rgba(255, 255, 255, 1.0)\"}},\"header\":{\"fill\":{\"color\":\"rgba(200, 212, 227, 1.0)\"},\"line\":{\"color\":\"rgba(255, 255, 255, 1.0)\"}}}]}}};\r\n",
77+
" var config = {\"responsive\":true};\r\n",
78+
" Plotly.newPlot('840d7c5e-a3a2-4964-ab50-2a5880783536', data, layout, config);\r\n",
79+
"});\r\n",
80+
" };\r\n",
81+
" if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) {\r\n",
82+
" var script = document.createElement(\"script\");\r\n",
83+
" script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\");\r\n",
84+
" script.onload = function(){\r\n",
85+
" renderPlotly_840d7c5ea3a24964ab502a5880783536();\r\n",
86+
" };\r\n",
87+
" document.getElementsByTagName(\"head\")[0].appendChild(script);\r\n",
88+
" }\r\n",
89+
" else {\r\n",
90+
" renderPlotly_840d7c5ea3a24964ab502a5880783536();\r\n",
91+
" }\r\n",
92+
"</script>\r\n",
93+
"\r\n",
94+
" <div class=container>\r\n",
95+
" <h3>Chart Description Title</h3>\r\n",
96+
" <p>\r\n",
97+
"<h3>CAN I USE HTML HERE?</h3>\r\n",
98+
"<ul>\r\n",
99+
" <li><b>yes</b></li> \r\n",
100+
" <li><i>you</i></li> \r\n",
101+
" <li><a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\">can!</a></li>\r\n",
102+
"</ul>\r\n",
103+
"\r\n",
104+
"\r\n",
105+
"\r\n",
106+
"</p>\r\n",
107+
"</div>\r\n",
108+
"</div \r\n"
109+
]
110+
},
111+
"metadata": {},
112+
"output_type": "display_data"
113+
}
114+
],
115+
"source": [
116+
"open Plotly.NET\n",
117+
"open Plotly.NET.Interactive\n",
118+
"\n",
119+
"Chart.Point([1,2])\n",
120+
"|> Chart.withDescription(\n",
121+
" ChartDescription.create\n",
122+
" \"Chart Description Title\"\n",
123+
" \"\"\"\n",
124+
"<h3>CAN I USE HTML HERE?</h3>\n",
125+
"<ul>\n",
126+
" <li><b>yes</b></li> \n",
127+
" <li><i>you</i></li> \n",
128+
" <li><a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\">can!</a></li>\n",
129+
"</ul>\n",
130+
"\"\"\"\n",
131+
")"
132+
]
133+
}
134+
],
135+
"metadata": {
136+
"kernelspec": {
137+
"display_name": ".NET (F#)",
138+
"language": "F#",
139+
"name": ".net-fsharp"
140+
},
141+
"language_info": {
142+
"name": "F#"
143+
}
144+
},
145+
"nbformat": 4,
146+
"nbformat_minor": 2
147+
}

0 commit comments

Comments
 (0)