Skip to content

Commit 7396529

Browse files
committed
Add remaining encoded chart roots
Summary: - add encoded-only chart root overloads for Scatter, BarPolar, ChoroplethMap, ChoroplethMapbox, DensityMapbox, FunnelArea, and Icicle - keep the plain chart roots unchanged and leave keyValuesEncoded conveniences plus Sankey out of scope for this slice - add chart-level EncodedTypedArray tests and upstream PlotlyJS 2.28 fixtures/assertions for the new roots - replace the FSharpConsole sample with a focused encoded Chart.Scatter root example Verification: - .\build.cmd runTestsCore - 900 tests passed
1 parent 1d8e9e5 commit 7396529

File tree

8 files changed

+926
-8
lines changed

8 files changed

+926
-8
lines changed

src/Plotly.NET/ChartAPI/Chart2D.fs

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,115 @@ module Chart2D =
167167

168168
Chart.renderScatterTrace useDefaults useWebGL style
169169

170+
/// <summary>
171+
/// Creates a Scatter plot from encoded x and y coordinates.
172+
///
173+
/// 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
174+
/// </summary>
175+
/// <param name="xEncoded">Sets the x coordinates of the plotted data as an encoded typed array.</param>
176+
/// <param name="yEncoded">Sets the y coordinates of the plotted data as an encoded typed array.</param>
177+
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
178+
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
179+
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
180+
/// <param name="Opacity">Sets the opactity of the trace</param>
181+
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
182+
/// <param name="Text">Sets a text associated with each datum</param>
183+
/// <param name="MultiText">Sets individual text for each datum</param>
184+
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
185+
/// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param>
186+
/// <param name="MarkerColor">Sets the color of the marker</param>
187+
/// <param name="MarkerColorScale">Sets the colorscale of the marker</param>
188+
/// <param name="MarkerOutline">Sets the outline of the marker</param>
189+
/// <param name="MarkerSymbol">Sets the marker symbol for each datum</param>
190+
/// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param>
191+
/// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param>
192+
/// <param name="LineColor">Sets the color of the line</param>
193+
/// <param name="LineColorScale">Sets the colorscale of the line</param>
194+
/// <param name="LineWidth">Sets the width of the line</param>
195+
/// <param name="LineDash">sets the drawing style of the line</param>
196+
/// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param>
197+
/// <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>
198+
/// <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>
199+
/// <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>
200+
/// <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>
201+
/// <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>
202+
/// <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>
203+
/// <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>
204+
/// <param name="FillPattern">Sets the pattern within the marker.</param>
205+
/// <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>
206+
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
207+
[<Extension>]
208+
static member Scatter
209+
(
210+
xEncoded: EncodedTypedArray,
211+
yEncoded: EncodedTypedArray,
212+
mode: StyleParam.Mode,
213+
?Name: string,
214+
?ShowLegend: bool,
215+
?Opacity: float,
216+
?MultiOpacity: seq<float>,
217+
?Text: #IConvertible,
218+
?MultiText: seq<#IConvertible>,
219+
?TextPosition: StyleParam.TextPosition,
220+
?MultiTextPosition: seq<StyleParam.TextPosition>,
221+
?MarkerColor: Color,
222+
?MarkerColorScale: StyleParam.Colorscale,
223+
?MarkerOutline: Line,
224+
?MarkerSymbol: StyleParam.MarkerSymbol,
225+
?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol>,
226+
?Marker: Marker,
227+
?LineColor: Color,
228+
?LineColorScale: StyleParam.Colorscale,
229+
?LineWidth: float,
230+
?LineDash: StyleParam.DrawingStyle,
231+
?Line: Line,
232+
?AlignmentGroup: string,
233+
?OffsetGroup: string,
234+
?StackGroup: string,
235+
?Orientation: StyleParam.Orientation,
236+
?GroupNorm: StyleParam.GroupNorm,
237+
?Fill: StyleParam.Fill,
238+
?FillColor: Color,
239+
?FillPattern: Pattern,
240+
?UseWebGL: bool,
241+
?UseDefaults: bool
242+
) =
243+
244+
Chart.Scatter(
245+
XEncoded = xEncoded,
246+
YEncoded = yEncoded,
247+
Mode = mode,
248+
?Name = Name,
249+
?ShowLegend = ShowLegend,
250+
?Opacity = Opacity,
251+
?MultiOpacity = MultiOpacity,
252+
?Text = Text,
253+
?MultiText = MultiText,
254+
?TextPosition = TextPosition,
255+
?MultiTextPosition = MultiTextPosition,
256+
?MarkerColor = MarkerColor,
257+
?MarkerColorScale = MarkerColorScale,
258+
?MarkerOutline = MarkerOutline,
259+
?MarkerSymbol = MarkerSymbol,
260+
?MultiMarkerSymbol = MultiMarkerSymbol,
261+
?Marker = Marker,
262+
?LineColor = LineColor,
263+
?LineColorScale = LineColorScale,
264+
?LineWidth = LineWidth,
265+
?LineDash = LineDash,
266+
?Line = Line,
267+
?AlignmentGroup = AlignmentGroup,
268+
?OffsetGroup = OffsetGroup,
269+
?StackGroup = StackGroup,
270+
?Orientation = Orientation,
271+
?GroupNorm = GroupNorm,
272+
?Fill = Fill,
273+
?FillColor = FillColor,
274+
?FillPattern = FillPattern,
275+
?UseWebGL = UseWebGL,
276+
?UseDefaults = UseDefaults
277+
)
278+
170279
/// <summary>
171280
/// Creates a Scatter plot.
172281
///

0 commit comments

Comments
 (0)