Inline package references and charting
With fsdocs 8.0, the tool can roll forward to .net 5, meaning you can use inline package references in the docs scripts:
#r "nuget: Plotly.NET, 2.0.0-preview.6"
open Plotly.NET
let myChart =
Chart.Line(
[
1.,1.
5.,6.
23.,9.
]
)
|> Chart.withTitle "Hello fsdocs!"
You can now also include raw html in your docs scripts with the new include-it-raw
.
To incude the chart html of a Plotly.NET chart and and render it on the docs page, use the GenericChart.toChartHTML
and include the raw output.
the actual codeblock looks like this:
(***hide***) myChart |> GenericChart.toChartHTML (***include-it-raw***)
Here is the rendered chart:
namespace Plotly
namespace Plotly.NET
val myChart: GenericChart.GenericChart
type Chart =
static member Area: x: #IConvertible seq * y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: Symbol * [<Optional; DefaultParameterValue ((null :> obj))>] ?Color: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Labels: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?Dash: DrawingStyle * [<Optional; DefaultParameterValue ((null :> obj))>] ?Width: float -> GenericChart + 1 overload
static member Bar: keys: #IConvertible seq * values: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Color: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Labels: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker -> GenericChart + 1 overload
static member BoxPlot: [<Optional; DefaultParameterValue ((null :> obj))>] ?x: 'a0 * [<Optional; DefaultParameterValue ((null :> obj))>] ?y: 'a1 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Color: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Fillcolor: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Whiskerwidth: 'a3 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Boxpoints: Boxpoints * [<Optional; DefaultParameterValue ((null :> obj))>] ?Boxmean: BoxMean * [<Optional; DefaultParameterValue ((null :> obj))>] ?Jitter: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Pointpos: 'a5 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?Alignmentgroup: 'a6 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Offsetgroup: 'a7 * [<Optional; DefaultParameterValue ((null :> obj))>] ?Notched: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?NotchWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?QuartileMethod: QuartileMethod -> GenericChart + 1 overload
static member Bubble: x: #IConvertible seq * y: #IConvertible seq * sizes: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: Symbol * [<Optional; DefaultParameterValue ((null :> obj))>] ?Color: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Labels: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Orientation: Orientation * [<Optional; DefaultParameterValue ((null :> obj))>] ?GroupNorm: GroupNorm * [<Optional; DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool -> GenericChart + 1 overload
static member Candlestick: ``open`` : #IConvertible seq * high: #IConvertible seq * low: #IConvertible seq * close: #IConvertible seq * x: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Increasing: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?Decreasing: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?WhiskerWidth: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Line: Line * [<Optional; DefaultParameterValue ((null :> obj))>] ?XCalendar: Calendar -> GenericChart + 1 overload
static member ChoroplethMap: locations: string seq * z: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Locationmode: LocationFormat * [<Optional; DefaultParameterValue ((null :> obj))>] ?Autocolorscale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorscale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorbar: Colorbar * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker * [<Optional; DefaultParameterValue ((null :> obj))>] ?GeoJson: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?FeatureIdKey: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Zmin: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Zmax: float -> GenericChart
static member ChoroplethMapbox: locations: #IConvertible seq * z: #IConvertible seq * geoJson: 'a2 * [<Optional; DefaultParameterValue ((null :> obj))>] ?FeatureIdKey: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Below: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorscale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorbar: Colorbar * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZAuto: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMin: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMid: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMax: float -> GenericChart
static member Column: keys: #IConvertible seq * values: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Color: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Labels: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextPosition: TextPosition * [<Optional; DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<Optional; DefaultParameterValue ((null :> obj))>] ?Marker: Marker -> GenericChart + 1 overload
static member Contour: data: #('a1 seq) seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?X: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Y: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Name: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorscale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showscale: 'a4 * [<Optional; DefaultParameterValue ((null :> obj))>] ?zSmooth: SmoothAlg * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorbar: 'a5 -> GenericChart (requires 'a1 :> IConvertible)
static member DensityMapbox: lon: #IConvertible seq * lat: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Z: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Radius: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?Text: #IConvertible seq * [<Optional; DefaultParameterValue ((null :> obj))>] ?Below: string * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorscale: Colorscale * [<Optional; DefaultParameterValue ((null :> obj))>] ?Colorbar: Colorbar * [<Optional; DefaultParameterValue ((null :> obj))>] ?Showscale: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZAuto: bool * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMin: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMid: float * [<Optional; DefaultParameterValue ((null :> obj))>] ?ZMax: float -> GenericChart + 1 overload
...
<summary> Provides a set of static methods for creating charts. </summary>
<summary> Provides a set of static methods for creating charts. </summary>
static member Chart.Line: xy: (#System.IConvertible * #System.IConvertible) seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Name: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: StyleParam.Symbol * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Color: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Labels: #System.IConvertible seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextPosition: StyleParam.TextPosition * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Dash: StyleParam.DrawingStyle * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Width: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Orientation: StyleParam.Orientation * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?GroupNorm: StyleParam.GroupNorm * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool -> GenericChart.GenericChart
static member Chart.Line: x: #System.IConvertible seq * y: #System.IConvertible seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Name: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: StyleParam.Symbol * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Color: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Labels: #System.IConvertible seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextPosition: StyleParam.TextPosition * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Dash: StyleParam.DrawingStyle * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Width: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Orientation: StyleParam.Orientation * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?GroupNorm: StyleParam.GroupNorm * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool -> GenericChart.GenericChart
static member Chart.Line: x: #System.IConvertible seq * y: #System.IConvertible seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Name: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?ShowMarkers: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Showlegend: bool * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?MarkerSymbol: StyleParam.Symbol * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Color: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Opacity: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Labels: #System.IConvertible seq * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextPosition: StyleParam.TextPosition * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?TextFont: Font * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Dash: StyleParam.DrawingStyle * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Width: float * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?StackGroup: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Orientation: StyleParam.Orientation * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?GroupNorm: StyleParam.GroupNorm * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((false :> obj))>] ?UseWebGL: bool -> GenericChart.GenericChart
static member Chart.withTitle: title: string * [<System.Runtime.InteropServices.Optional; System.Runtime.InteropServices.DefaultParameterValue ((null :> obj))>] ?Titlefont: Font -> (GenericChart.GenericChart -> GenericChart.GenericChart)
module GenericChart
from Plotly.NET
<summary> Module to represent a GenericChart </summary>
<summary> Module to represent a GenericChart </summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
<summary> Converts a GenericChart to it HTML representation. The div layer has a default size of 600 if not specified otherwise. </summary>
<summary> Converts a GenericChart to it HTML representation. The div layer has a default size of 600 if not specified otherwise. </summary>