Skip to content

Commit d57ed25

Browse files
committed
#40: Add improved description for Scatter Plots
1 parent 70b86d0 commit d57ed25

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

src/FSharp.Plotly/Chart.fs

+35-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ open Trace3d
1010
open StyleParam
1111
open System.Runtime.InteropServices
1212

13-
1413
// ###########
1514
// Copied from FSharp.Care.Collections to remove dependancies
1615
[<AutoOpen>]
@@ -34,18 +33,42 @@ module Seq =
3433
/// Provides a set of static methods for creating charts.
3534
type Chart =
3635

37-
/// Uses points, line or both depending on the mode to represent data points
36+
37+
/// Creates a Scatter plot. Scatter plots 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
38+
///
39+
///Parameters:
40+
///
41+
///Name : Sets the trace name. The trace name appear as the legend item and on hover
42+
///
43+
///Showlegend : Determines whether or not an item corresponding to this trace is shown in the legend.
44+
///
45+
///MarkerSymbol : Sets the type of symbol that datums are displayed as
46+
///
47+
///Color : Sets Line/Marker Color
48+
///
49+
///Opacity : Sets the Opacity of the trace
50+
///
51+
///Labels : Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.
52+
///
53+
///TextPosition : Sets the positions of the `text` elements with respects to the (x,y) coordinates.
54+
///
55+
///TextFont : Sets the text font of this trace
56+
///
57+
///Dash : Sets the Line Dash style
58+
///
59+
///Width : Sets the Line width
3860
static member Scatter(x, y,mode,
39-
[<Optional;DefaultParameterValue(null)>] ?Name,
40-
[<Optional;DefaultParameterValue(null)>] ?Showlegend,
41-
[<Optional;DefaultParameterValue(null)>] ?MarkerSymbol,
42-
[<Optional;DefaultParameterValue(null)>] ?Color,
43-
[<Optional;DefaultParameterValue(null)>] ?Opacity,
44-
[<Optional;DefaultParameterValue(null)>] ?Labels,
45-
[<Optional;DefaultParameterValue(null)>] ?TextPosition,
46-
[<Optional;DefaultParameterValue(null)>] ?TextFont,
47-
[<Optional;DefaultParameterValue(null)>] ?Dash,
48-
[<Optional;DefaultParameterValue(null)>] ?Width) =
61+
[<Optional;DefaultParameterValue(null)>] ?Name ,
62+
[<Optional;DefaultParameterValue(null)>] ?Showlegend ,
63+
[<Optional;DefaultParameterValue(null)>] ?MarkerSymbol ,
64+
[<Optional;DefaultParameterValue(null)>] ?Color ,
65+
[<Optional;DefaultParameterValue(null)>] ?Opacity ,
66+
[<Optional;DefaultParameterValue(null)>] ?Labels ,
67+
[<Optional;DefaultParameterValue(null)>] ?TextPosition ,
68+
[<Optional;DefaultParameterValue(null)>] ?TextFont ,
69+
[<Optional;DefaultParameterValue(null)>] ?Dash ,
70+
[<Optional;DefaultParameterValue(null)>] ?Width : float
71+
) =
4972
Trace.initScatter (
5073
TraceStyle.Scatter(X = x,Y = y, Mode=mode) )
5174
|> TraceStyle.TraceInfo(?Name=Name,?Showlegend=Showlegend,?Opacity=Opacity)

0 commit comments

Comments
 (0)