Skip to content

Commit 8069616

Browse files
committed
Add new Marker/Line attributes to respective TraceStyle and Chart function
1 parent 61d70c2 commit 8069616

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Diff for: src/Plotly.NET/ChartAPI/Chart.fs

+16-1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ type Chart =
208208
/// <summary>
209209
/// Applies the given styles to the marker object(s) of the chart's trace(s). Overwrites attributes with the same name that are already set.
210210
/// </summary>
211+
/// <param name="Angle">Sets the marker angle in respect to `angleref`.</param>
212+
/// <param name="AngleRef">Sets the reference for marker angle. With "previous", angle 0 points along the line from the previous point to this one. With "up", angle 0 points toward the top of the screen.</param>
211213
/// <param name="AutoColorScale">Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.</param>
212214
/// <param name="CAuto">Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color`is set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user.</param>
213215
/// <param name="CMax">Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.</param>
@@ -231,6 +233,8 @@ type Chart =
231233
/// <param name="SizeMin">Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.</param>
232234
/// <param name="SizeMode">Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.</param>
233235
/// <param name="SizeRef">Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.</param>
236+
/// <param name="StandOff">Moves the marker away from the data point in the direction of `angle` (in px). This can be useful for example if you have another marker at this location and you want to point an arrowhead marker at it.</param>
237+
/// <param name="MultiStandOff">Moves the marker away from the data point in the direction of `angle` (in px). This can be useful for example if you have another marker at this location and you want to point an arrowhead marker at it.</param>
234238
/// <param name="Symbol">Sets the marker symbol.</param>
235239
/// <param name="MultiSymbol">Sets the individual marker symbols.</param>
236240
/// <param name="Symbol3D">Sets the marker symbol for 3d traces.</param>
@@ -240,6 +244,8 @@ type Chart =
240244
[<CompiledName("WithMarkerStyle")>]
241245
static member withMarkerStyle
242246
(
247+
[<Optional; DefaultParameterValue(null)>] ?Angle: float,
248+
[<Optional; DefaultParameterValue(null)>] ?AngleRef: StyleParam.AngleRef,
243249
[<Optional; DefaultParameterValue(null)>] ?AutoColorScale: bool,
244250
[<Optional; DefaultParameterValue(null)>] ?CAuto: bool,
245251
[<Optional; DefaultParameterValue(null)>] ?CMax: float,
@@ -263,6 +269,8 @@ type Chart =
263269
[<Optional; DefaultParameterValue(null)>] ?SizeMin: int,
264270
[<Optional; DefaultParameterValue(null)>] ?SizeMode: StyleParam.MarkerSizeMode,
265271
[<Optional; DefaultParameterValue(null)>] ?SizeRef: int,
272+
[<Optional; DefaultParameterValue(null)>] ?StandOff: float,
273+
[<Optional; DefaultParameterValue(null)>] ?MultiStandOff: seq<float>,
266274
[<Optional; DefaultParameterValue(null)>] ?Symbol: StyleParam.MarkerSymbol,
267275
[<Optional; DefaultParameterValue(null)>] ?MultiSymbol: seq<StyleParam.MarkerSymbol>,
268276
[<Optional; DefaultParameterValue(null)>] ?Symbol3D: StyleParam.MarkerSymbol3D,
@@ -274,6 +282,8 @@ type Chart =
274282
ch
275283
|> mapTrace (
276284
TraceStyle.Marker(
285+
?Angle=Angle,
286+
?AngleRef=AngleRef,
277287
?AutoColorScale = AutoColorScale,
278288
?CAuto = CAuto,
279289
?CMax = CMax,
@@ -302,7 +312,9 @@ type Chart =
302312
?ShowScale = ShowScale,
303313
?SizeMin = SizeMin,
304314
?SizeMode = SizeMode,
305-
?SizeRef = SizeRef
315+
?SizeRef = SizeRef,
316+
?StandOff = StandOff,
317+
?MultiStandOff = MultiStandOff
306318
)
307319
)
308320

@@ -334,6 +346,7 @@ type Chart =
334346
/// <summary>
335347
/// Applies the given styles to the line object(s) of the chart's trace(s). Overwrites attributes with the same name that are already set.
336348
/// </summary>
349+
/// <param name="BackOff">Sets the line back off from the end point of the nth line segment (in px). This option is useful e.g. to avoid overlap with arrowhead markers. With "auto" the lines would trim before markers if `marker.angleref` is set to "previous".</param>
337350
/// <param name="AutoColorScale">Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `line.colorscale`. Has an effect only if in `line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.</param>
338351
/// <param name="CAuto">Determines whether or not the color domain is computed with respect to the input data (here in `line.color`) or the bounds set in `line.cmin` and `line.cmax` Has an effect only if in `line.color`is set to a numerical array. Defaults to `false` when `line.cmin` and `line.cmax` are set by the user.</param>
339352
/// <param name="CMax">Sets the upper bound of the color domain. Has an effect only if in `line.color`is set to a numerical array. Value should have the same units as in `line.color` and if set, `line.cmin` must be set as well.</param>
@@ -356,6 +369,7 @@ type Chart =
356369
[<CompiledName("WithLineStyle")>]
357370
static member withLineStyle
358371
(
372+
[<Optional; DefaultParameterValue(null)>] ?BackOff: StyleParam.BackOff,
359373
[<Optional; DefaultParameterValue(null)>] ?AutoColorScale: bool,
360374
[<Optional; DefaultParameterValue(null)>] ?CAuto: bool,
361375
[<Optional; DefaultParameterValue(null)>] ?CMax: float,
@@ -380,6 +394,7 @@ type Chart =
380394
ch
381395
|> mapTrace (
382396
TraceStyle.Line(
397+
?BackOff = BackOff,
383398
?AutoColorScale = AutoColorScale,
384399
?CAuto = CAuto,
385400
?CMax = CMax,

Diff for: src/Plotly.NET/Traces/Trace.fs

+7
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ type TraceStyle() =
345345
/// <param name="OutlierWidth">Sets the width of the outlier sample points.</param>
346346
static member Marker
347347
(
348+
[<Optional; DefaultParameterValue(null)>] ?Angle: float,
349+
[<Optional; DefaultParameterValue(null)>] ?AngleRef: StyleParam.AngleRef,
348350
[<Optional; DefaultParameterValue(null)>] ?AutoColorScale: bool,
349351
[<Optional; DefaultParameterValue(null)>] ?CAuto: bool,
350352
[<Optional; DefaultParameterValue(null)>] ?CMax: float,
@@ -368,6 +370,8 @@ type TraceStyle() =
368370
[<Optional; DefaultParameterValue(null)>] ?SizeMin: int,
369371
[<Optional; DefaultParameterValue(null)>] ?SizeMode: StyleParam.MarkerSizeMode,
370372
[<Optional; DefaultParameterValue(null)>] ?SizeRef: int,
373+
[<Optional; DefaultParameterValue(null)>] ?StandOff: float,
374+
[<Optional; DefaultParameterValue(null)>] ?MultiStandOff: seq<float>,
371375
[<Optional; DefaultParameterValue(null)>] ?Symbol: StyleParam.MarkerSymbol,
372376
[<Optional; DefaultParameterValue(null)>] ?MultiSymbol: seq<StyleParam.MarkerSymbol>,
373377
[<Optional; DefaultParameterValue(null)>] ?Symbol3D: StyleParam.MarkerSymbol3D,
@@ -416,6 +420,7 @@ type TraceStyle() =
416420
/// <summary>
417421
/// Returns a function that applies the given styles to the trace's line object. Overwrites attributes with the same name that are already set.
418422
/// </summary>
423+
/// <param name="BackOff">Sets the line back off from the end point of the nth line segment (in px). This option is useful e.g. to avoid overlap with arrowhead markers. With "auto" the lines would trim before markers if `marker.angleref` is set to "previous".</param>
419424
/// <param name="AutoColorScale">Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `line.colorscale`. Has an effect only if in `line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.</param>
420425
/// <param name="CAuto">Determines whether or not the color domain is computed with respect to the input data (here in `line.color`) or the bounds set in `line.cmin` and `line.cmax` Has an effect only if in `line.color`is set to a numerical array. Defaults to `false` when `line.cmin` and `line.cmax` are set by the user.</param>
421426
/// <param name="CMax">Sets the upper bound of the color domain. Has an effect only if in `line.color`is set to a numerical array. Value should have the same units as in `line.color` and if set, `line.cmin` must be set as well.</param>
@@ -437,6 +442,7 @@ type TraceStyle() =
437442
/// <param name="OutlierWidth">Sets the width of the outline of outliers</param>
438443
static member Line
439444
(
445+
[<Optional; DefaultParameterValue(null)>] ?BackOff: StyleParam.BackOff,
440446
[<Optional; DefaultParameterValue(null)>] ?AutoColorScale: bool,
441447
[<Optional; DefaultParameterValue(null)>] ?CAuto: bool,
442448
[<Optional; DefaultParameterValue(null)>] ?CMax: float,
@@ -462,6 +468,7 @@ type TraceStyle() =
462468
trace
463469
|> Trace.getLine
464470
|> Line.style (
471+
?BackOff = BackOff,
465472
?AutoColorScale = AutoColorScale,
466473
?CAuto = CAuto,
467474
?CMax = CMax,

0 commit comments

Comments
 (0)