You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
- add encoded typed-array inputs for Scatter ids, customdata, selectedpoints, and per-point text
- add encoded typed-array inputs for Error.array and Error.arrayminus
- keep the existing plain-array API surface intact while making the encoded path override the plain path on the same property
- extend the low-level EncodedTypedArray tests with scatter override/integration cases, direct Error serialization coverage, and explicit arrayminus precedence checks
- expand the PlotlyJS 2.28 upstream feature fixture to include a fully encoded scatter with encoded error bars and assert the end-to-end HTML output
- add the matching FSharpConsole manual demo for the fully encoded scatter-with-error-bars path
Files:
- src/Plotly.NET/Traces/Trace2D.fs
- src/Plotly.NET/Traces/ObjectAbstractions/Error.fs
- tests/CoreTests/CoreTests/CommonAbstractions/EncodedTypedArray.fs
- tests/Common/FSharpTestBase/TestCharts/UpstreamFeatures/2.28.fs
- tests/CoreTests/CoreTests/UpstreamFeatures/2.28.fs
- tests/ConsoleApps/FSharpConsole/Program.fs
Verification:
- .\\build.cmd runTestsCore
- 725 tests passed
Copy file name to clipboardExpand all lines: src/Plotly.NET/Traces/ObjectAbstractions/Error.fs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ type Error() =
18
18
/// <paramname ="Symmetric">Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.</param>
19
19
/// <paramname ="Array">Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.</param>
20
20
/// <paramname ="Arrayminus">Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.</param>
21
+
/// <paramname ="ArrayEncoded">Sets the error-bar lengths as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Array</c>.</param>
22
+
/// <paramname ="ArrayminusEncoded">Sets the negative-direction error-bar lengths as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Arrayminus</c>.</param>
21
23
/// <paramname ="Value">Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars.</param>
22
24
/// <paramname ="Valueminus">Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars</param>
23
25
/// <paramname ="Traceref"></param>
@@ -33,6 +35,8 @@ type Error() =
33
35
?Symmetric:bool,
34
36
?Array:seq<#IConvertible>,
35
37
?Arrayminus:seq<#IConvertible>,
38
+
?ArrayEncoded:EncodedTypedArray,
39
+
?ArrayminusEncoded:EncodedTypedArray,
36
40
?Value:float,
37
41
?Valueminus:float,
38
42
?Traceref:int,
@@ -49,6 +53,8 @@ type Error() =
49
53
?Symmetric = Symmetric,
50
54
?Array = Array,
51
55
?Arrayminus = Arrayminus,
56
+
?ArrayEncoded = ArrayEncoded,
57
+
?ArrayminusEncoded = ArrayminusEncoded,
52
58
?Value = Value,
53
59
?Valueminus = Valueminus,
54
60
?Traceref = Traceref,
@@ -67,6 +73,8 @@ type Error() =
67
73
/// <paramname ="Symmetric">Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.</param>
68
74
/// <paramname ="Array">Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.</param>
69
75
/// <paramname ="Arrayminus">Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.</param>
76
+
/// <paramname ="ArrayEncoded">Sets the error-bar lengths as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Array</c>.</param>
77
+
/// <paramname ="ArrayminusEncoded">Sets the negative-direction error-bar lengths as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Arrayminus</c>.</param>
70
78
/// <paramname ="Value">Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars.</param>
71
79
/// <paramname ="Valueminus">Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars</param>
Copy file name to clipboardExpand all lines: src/Plotly.NET/Traces/Trace2D.fs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,7 @@ type Trace2DStyle() =
121
121
/// <paramname="Opacity">Sets the opacity of the trace.</param>
122
122
/// <paramname="Mode">Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover. If there are less than 20 points and the trace is not stacked then the default is "lines+markers". Otherwise, "lines".</param>
123
123
/// <paramname="Ids">Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.</param>
124
+
/// <paramname="IdsEncoded">Assigns id labels as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Ids</c>.</param>
124
125
/// <paramname="X">Sets the x coordinates.</param>
125
126
/// <paramname="MultiX">Sets the x coordinates.</param>
126
127
/// <paramname="X0">Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.</param>
@@ -131,6 +132,7 @@ type Trace2DStyle() =
131
132
/// <paramname="DY">Sets the y coordinate step. See `y0` for more info.</param>
132
133
/// <paramname="Text">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.</param>
133
134
/// <paramname="MultiText">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.</param>
135
+
/// <paramname="MultiTextEncoded">Sets the per-point text array as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>Text</c>/<c>MultiText</c>.</param>
134
136
/// <paramname="TextPosition">Sets the positions of the `text` elements with respects to the (x,y) coordinates.</param>
135
137
/// <paramname="MultiTextPosition">Sets the positions of the `text` elements with respects to the (x,y) coordinates.</param>
136
138
/// <paramname="TextTemplate">Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example "y: %{y}". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.</param>
@@ -144,6 +146,7 @@ type Trace2DStyle() =
144
146
/// <paramname="YHoverFormat">Sets the hover text formatting rulefor `y` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, "2016-10-13 09:15:23.456" with tickformat "%H~%M~%S.%2f" would display "09~15~23.46"By default the values are formatted using `xaxis.hoverformat`.</param>
145
147
/// <paramname="Meta">Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.</param>
146
148
/// <paramname="CustomData">Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements</param>
149
+
/// <paramname="CustomDataEncoded">Assigns extra data for each datum as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>CustomData</c>.</param>
147
150
/// <paramname="XAxis">Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on.</param>
148
151
/// <paramname="YAxis">Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on.</param>
149
152
/// <paramname="Orientation">Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used - including if `visible` is "legendonly" but not if it is `false`. Sets the stacking direction. With "v" ("h"), the y (x) values of subsequent traces are added. Also affects the default value of `fill`.</param>
@@ -163,6 +166,7 @@ type Trace2DStyle() =
163
166
/// <paramname="XError">Sets the x error of this trace.</param>
164
167
/// <paramname="YError">Sets the y error of this trace.</param>
165
168
/// <paramname="SelectedPoints">Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.</param>
169
+
/// <paramname="SelectedPointsEncoded">Sets the selected-point indices as a base64-encoded typed array (plotly.js >= 2.28.0). If provided, overrides <c>SelectedPoints</c>.</param>
166
170
/// <paramname="Selected">Sets the style of selected points of this trace.</param>
167
171
/// <paramname="Unselected">Sets the style of unselected points of this trace.</param>
168
172
/// <paramname="ClipOnAxis">Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set `xaxis.layer` and `yaxis.layer` to "below traces".</param>
0 commit comments