8000 Plotly.NET/src/Plotly.NET/ChartAPI/Chart2D.fs at dev · plotly/Plotly.NET · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
6552 lines (6246 loc) · 421 KB

File metadata and controls

6552 lines (6246 loc) · 421 KB
namespace Plotly.NET
open Plotly.NET.LayoutObjects
open Plotly.NET.TraceObjects
open DynamicObj
open System
open System.IO
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
[<AutoOpen>]
module Chart2D =
[<Extension>]
type Chart =
[<Extension>]
static member internal renderScatterTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) =
if useWebGL then
Trace2D.initScatterGL style |> GenericChart.ofTraceObject useDefaults
else
Trace2D.initScatter style |> GenericChart.ofTraceObject useDefaults
[<Extension>]
static member internal renderHeatmapTrace (useDefaults: bool) (useWebGL: bool) (style: Trace2D -> Trace2D) =
if useWebGL then
Trace2D.initHeatmapGL style |> GenericChart.ofTraceObject useDefaults
else
Trace2D.initHeatmap style |> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Creates a Scatter plot.
///
/// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble
/// </summary>
/// <param name="X">Sets the x coordinates of the plotted data.</param>
/// <param name="MultiX">Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Y">Sets the y coordinates of the plotted data.</param>
/// <param name="MultiY">Sets the x coordinates of the plotted data. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Mode">Determines the drawing mode for this scatter trace.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Scatter
(
?X: seq<#IConvertible>,
?MultiX: seq<seq<#IConvertible>>,
?Y: seq<#IConvertible>,
?MultiY: seq<seq<#IConvertible>>,
?Mode: StyleParam.Mode,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let marker =
Marker
|> Option.defaultValue (TraceObjects.Marker.init ())
|> TraceObjects.Marker.style (
?Color = MarkerColor,
?Outline = MarkerOutline,
?Symbol = MarkerSymbol,
?MultiSymbol = MultiMarkerSymbol,
?Colorscale = MarkerColorScale,
?MultiOpacity = MultiOpacity
)
let line =
Line
|> Option.defaultValue (Plotly.NET.Line.init ())
|> Plotly.NET.Line.style (
?Color = LineColor,
?Dash = LineDash,
?Colorscale = LineColorScale,
?Width = LineWidth
)
let style =
Trace2DStyle.Scatter(
?X = X,
?MultiX = MultiX,
?Y = Y,
?MultiY = MultiY,
?Mode = Mode,
Marker = marker,
Line = line,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern
)
let useWebGL = defaultArg UseWebGL false
Chart.renderScatterTrace useDefaults useWebGL style
/// <summary>
/// Creates a Scatter plot.
///
/// Scatter charts are the basis of Point, Line, and Bubble Charts, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble
/// </summary>
/// <param name="x">Sets the x coordinates of the plotted data.</param>
/// <param name="y">Sets the y coordinates of the plotted data.</param>
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within 1ADC the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Scatter
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
mode: StyleParam.Mode,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?Line F0E4 Width: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
Chart.Scatter(
X = x,
Y = y,
Mode = mode,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?LineColor = LineColor,
?LineColorScale = LineColorScale,
?LineWidth = LineWidth,
?LineDash = LineDash,
?Line = Line,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary>
/// Creates a Scatter chart. Scatter charts are the basis of Point, Line, and Bubble Charts in Plotly, and can be customized as such. We also provide abstractions for those: Chart.Line, Chart.Point, Chart.Bubble
/// </summary>
/// <param name="xy">Sets the x and y coordinates of the plotted data.</param>
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Scatter
(
xy: seq<#IConvertible * #IConvertible>,
mode: StyleParam.Mode,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
let x, y = Seq.unzip xy
Chart.Scatter(
x = x,
y = y,
mode = mode,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?LineColor = LineColor,
?LineColorScale = LineColorScale,
?LineWidth = LineWidth,
?LineDash = LineDash,
?Line = Line,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary>
/// Creates a Point chart, which uses Points in a 2D space to visualize data.
/// </summary>
/// <param name="x">Sets the x coordinates of the plotted data.</param>
/// <param name="y">Sets the y coordinates of the plotted data.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Point
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?UseWebGL: bool,
?UseDefaults: bool
) =
// if text position or font is set, then show labels (not only when hovering)
let changeMode =
StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome)
Chart.Scatter(
x = x,
y = y,
mode = changeMode StyleParam.Mode.Markers,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary>Creates a Point chart, which uses Points in a 2D space to visualize data. </summary>
/// <param name="xy">Sets the x and y coordinates of the plotted data.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Point
(
xy: seq<#IConvertible * #IConvertible>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?UseWebGL: bool,
?UseDefaults: bool
) =
let x, y = Seq.unzip xy
Chart.Point(
x = x,
y = y,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary> Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X.</summary>
/// <param name="x">Sets the x coordinates of the plotted data.</param>
/// <param name="y">Sets the y coordinates of the plotted data.</param>
/// <param name="ShowMarkers">Whether to show markers for the individual data points</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Line
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
?ShowMarkers: bool,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
// if text position or font is set than show labels (not only when hovering)
let changeMode =
let isShowMarker =
match ShowMarkers with
| Some isShow -> isShow
| Option.None -> false
StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome)
>> StyleParam.ModeUtils.showMarker (isShowMarker)
Chart.Scatter(
x = x,
y = y,
mode = changeMode StyleParam.Mode.Lines,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?LineColor = LineColor,
?LineColorScale = LineColorScale,
?LineWidth = LineWidth,
?LineDash = LineDash,
?Line = Line,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary>Creates a Line chart, which uses a Line plotted between the given datums in a 2D space to visualize typically an evolution of Y depending on X.</summary>
/// <param name="xy">Sets the x,y coordinates of the plotted data.</param>
/// <param name="ShowMarkers">Whether to show markers for the individual data points</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
8020 /// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Line
(
xy: seq<#IConvertible * #IConvertible>,
?ShowMarkers: bool,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
let x, y = Seq.unzip xy
Chart.Line(
x = x,
y = y,
?ShowMarkers = ShowMarkers,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?LineColor = LineColor,
?LineColorScale = LineColorScale,
?LineWidth = LineWidth,
?LineDash = LineDash,
?Line = Line,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern,
?UseWebGL = UseWebGL,
?UseDefaults = UseDefaults
)
/// <summary>Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart.
/// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X. </summary>
/// <param name="x">Sets the x coordinates of the plotted data.</param>
/// <param name="y">Sets the y coordinates of the plotted data.</param>
/// <param name="ShowMarkers">Whether to show markers for the individual data points</param>
/// <param name="Smoothing">Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Spline
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
?ShowMarkers: bool,
?Smoothing: float,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
// if text position set then show labels (not only when hovering)
let changeMode =
let isShowMarker =
match ShowMarkers with
| Some isShow -> isShow
| Option.None -> false
StyleParam.ModeUtils.showText (TextPosition.IsSome || MultiTextPosition.IsSome)
>> StyleParam.ModeUtils.showMarker (isShowMarker)
let useDefaults =
defaultArg UseDefaults true
let marker =
Marker
|> Option.defaultValue (TraceObjects.Marker.init ())
|> TraceObjects.Marker.style (
?Color = MarkerColor,
?Outline = MarkerOutline,
?Symbol = MarkerSymbol,
?MultiSymbol = MultiMarkerSymbol,
?Colorscale = MarkerColorScale,
?MultiOpacity = MultiOpacity
)
let line =
Line
|> Option.defaultValue (Plotly.NET.Line.init ())
|> Plotly.NET.Line.style (
?Color = LineColor,
?Dash = LineDash,
?Colorscale = LineColorScale,
?Width = LineWidth,
Shape = StyleParam.Shape.Spline,
?Smoothing = Smoothing
)
let style =
Trace2DStyle.Scatter(
X = x,
Y = y,
Mode = changeMode StyleParam.Mode.Lines,
Marker = marker,
Line = line,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?StackGroup = StackGroup,
?Orientation = Orientation,
?GroupNorm = GroupNorm,
?Fill = Fill,
?FillColor = FillColor,
?FillPattern = FillPattern
)
let useWebGL = defaultArg UseWebGL false
Chart.renderScatterTrace useDefaults useWebGL style
/// <summary>
/// Creates a Spline chart. A spline chart is a line chart in which data points are connected by smoothed curves: this modification is aimed to improve the design of a chart.
/// Very similar to Line Plots, spline charts are typically used to visualize an evolution of Y depending on X.
/// </summary>
/// <param name="xy">Sets the x,y coordinates of the plotted data.</param>
/// <param name="ShowMarkers">Whether to show markers for the individual data points</param>
/// <param name="Smoothing">Sets the amount of smoothing. "0" corresponds to no smoothing (equivalent to a "linear" shape). Use values between 0. and 1.3</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
/// <param name="MarkerColor">Sets the color of the marker</param>
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
/// <param name="MarkerOutline">Sets the outline of the marker</param>
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
/// <param name="LineColor">Sets the color of the line</param>
/// <param name="LineColorScale">Sets the colorscale of the line</param>
/// <param name="LineWidth">Sets the width of the line</param>
/// <param name="LineDash">sets the drawing style of the line</param>
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.</param>
/// <param name="OffsetGroup">Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.</param>
/// <param name="StackGroup">Set several traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if `Orientation` is Horizontal). Stacking also turns `fill` on by default and sets the default `mode` to "lines" irrespective of point count. ou can only stack on a numeric (linear or log) axis. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order</param>
/// <param name="Orientation">Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.</param>
/// <param name="GroupNorm">Sets the normalization for the sum of this `stackgroup. Only relevant when `stackgroup` is used, and only the first `groupnorm` found in the `stackgroup` will be used</param>
/// <param name="Fill">Sets the area to fill with a solid color. Defaults to "none" unless this trace is stacked, then it gets "tonexty" ("tonextx") if `orientation` is "v" ("h") Use with `FillColor` if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 respectively. "tonextx" and "tonexty" fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like "tozerox" and "tozeroy". "toself" connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. "tonext" fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like "toself" if there is no trace before it. "tonext" should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.</param>
/// <param name="FillColor">Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.</param>
/// <param name="FillPattern">Sets the pattern within the marker.</param>
/// <param name="UseWebGL">If true, plotly.js will use the WebGL engine to render this chart. use this when you want to render many objects at once.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Spline
(
xy: seq<#IConvertible * #IConvertible>,
?ShowMarkers: bool,
?Smoothing: float,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?MultiOpacity: seq<float>,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?MultiTextPosition: seq<StyleParam.TextPosition>,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerSymbol: StyleParam.MarkerSymbol,
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
?Marker: Marker,
?LineColor: Color,
?LineColorScale: StyleParam.Colorscale,
?LineWidth: float,
?LineDash: StyleParam.DrawingStyle,
?Line: Line,
?AlignmentGroup: string,
?OffsetGroup: string,
?StackGroup: string,
?Orientation: StyleParam.Orientation,
?GroupNorm: StyleParam.GroupNorm,
?Fill: StyleParam.Fill,
?FillColor: Color,
?FillPattern: Pattern,
?UseWebGL: bool,
?UseDefaults: bool
) =
let x, y = Seq.unzip xy
Chart.Spline(
x = x,
y = y,
?ShowMarkers = ShowMarkers,
?Smoothing = Smoothing,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?MultiOpacity = MultiOpacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?MultiTextPosition = MultiTextPosition,
?MarkerColor = MarkerColor,
?MarkerColorScale = MarkerColorScale,
?MarkerOutline = MarkerOutline,
?MarkerSymbol = MarkerSymbol,
?MultiMarkerSymbol = MultiMarkerSymbol,
?Marker = Marker,
?LineColor = LineColor,
?LineColorScale = LineColorScale,
0