Skip to content

Commit 7c123fe

Browse files
committed
Update Legend grouping for Residual charts
- Avoid default grouping when legend groups are not given
1 parent 8a1dad6 commit 7c123fe

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

src/Plotly.NET/ChartAPI/Chart2D.fs

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6022,7 +6022,8 @@ module Chart2D =
60226022
/// <param name="reference">Sets the y coordinates for reference Y value.</param>
60236023
/// <param name="Name">Sets the trace name of the Y values. The trace name appear as the legend item and on hover</param>
60246024
/// <param name="ReferenceName">Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover</param>
6025-
/// <param name="GroupName">Sets the name of the legendgroup for the three traces of this plot.</param>
6025+
/// <param name="LegendGroupData">Sets the name of the legendgroup for the data distribution trace of this plot.</param>
6026+
/// <param name="LegendGroupReference">Sets the name of the legendgroup for the reference trace of this plot.</param>
60266027
/// <param name="ShowMarkers">Determines whether or not an To show markers for each datum.</param>
60276028
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
60286029
/// <param name="Text">Sets a text associated with each datum for the Y values.</param>
@@ -6059,7 +6060,8 @@ module Chart2D =
60596060
reference: seq<#IConvertible>,
60606061
?Name: string,
60616062
?ReferenceName: string,
6062-
?GroupName: string,
6063+
?LegendGroupData: string,
6064+
?LegendGroupReference: string,
60636065
?ShowMarkers: bool,
60646066
?ShowLegend: bool,
60656067
?Text: #IConvertible,
@@ -6165,8 +6167,8 @@ module Chart2D =
61656167
)
61666168
|> GenericChart.mapTrace (
61676169
Trace2DStyle.Scatter(
6168-
LegendGroup = (defaultArg GroupName "Datapoints"),
6169-
LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Datapoints")))
6170+
?LegendGroup = LegendGroupData,
6171+
?LegendGroupTitle = if LegendGroupData.IsSome then Some (Title.init (Text = LegendGroupData.Value)) else None
61706172
)
61716173
)
61726174

@@ -6184,8 +6186,8 @@ module Chart2D =
61846186
?TextPosition = ReferenceTextPosition,
61856187
?MultiTextPosition = MultiReferenceTextPosition,
61866188
?Line = ReferenceLine,
6187-
LegendGroup = (defaultArg GroupName "Reference Line"),
6188-
LegendGroupTitle = (Title.init (Text = (defaultArg GroupName "Reference Line")))
6189+
?LegendGroup = LegendGroupReference,
6190+
?LegendGroupTitle = if LegendGroupReference.IsSome then Some (Title.init (Text = LegendGroupReference.Value)) else None
61896191
)
61906192
)
61916193
|> TraceStyle.Marker(
@@ -6206,7 +6208,8 @@ module Chart2D =
62066208
/// <param name="reference">Sets the y coordinates for reference Y value.</param>
62076209
/// <param name="Name">Sets the trace name of the Y values. The trace name appear as the legend item and on hover</param>
62086210
/// <param name="ReferenceName">Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover</param>
6209-
/// <param name="GroupName">Sets the name of the legendgroup for the three traces of this plot.</param>
6211+
/// <param name="LegendGroupData">Sets the name of the legendgroup for the data distribution trace of this plot.</param>
6212+
/// <param name="LegendGroupReference">Sets the name of the legendgroup for the reference trace of this plot.</param>
62106213
/// <param name="ShowMarkers">Determines whether or not an To show markers for each datum.</param>
62116214
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
62126215
/// <param name="Text">Sets a text associated with each datum for the Y values.</param>
@@ -6242,7 +6245,8 @@ module Chart2D =
62426245
reference: seq<#IConvertible>,
62436246
?Name: string,
62446247
?ReferenceName: string,
6245-
?GroupName: string,
6248+
?LegendGroupData: string,
6249+
?LegendGroupReference: string,
62466250
?ShowMarkers: bool,
62476251
?ShowLegend: bool,
62486252
?Text: #IConvertible,
@@ -6281,7 +6285,8 @@ module Chart2D =
62816285
reference = reference,
62826286
?Name = Name,
62836287
?ReferenceName = ReferenceName,
6284-
?GroupName = GroupName,
6288+
?LegendGroupData = LegendGroupData,
6289+
?LegendGroupReference = LegendGroupReference,
62856290
?ShowMarkers = ShowMarkers,
62866291
?ShowLegend = ShowLegend,
62876292
?Text = Text,
@@ -6318,7 +6323,8 @@ module Chart2D =
63186323
/// <param name="referenceValue">Sets the y coordinate for reference Y value.</param>
63196324
/// <param name="Name">Sets the trace name of the Y values. The trace name appear as the legend item and on hover</param>
63206325
/// <param name="ReferenceName">Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover</param>
6321-
/// <param name="GroupName">Sets the name of the legendgroup for the three traces of this plot.</param>
6326+
/// <param name="LegendGroupData">Sets the name of the legendgroup for the data distribution trace of this plot.</param>
6327+
/// <param name="LegendGroupReference">Sets the name of the legendgroup for the reference trace of this plot.</param>
63226328
/// <param name="ShowMarkers">Determines whether or not an To show markers for each datum.</param>
63236329
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
63246330
/// <param name="Text">Sets a text associated with each datum for the Y values.</param>
@@ -6354,7 +6360,8 @@ module Chart2D =
63546360
referenceValue: #IConvertible,
63556361
?Name: string,
63566362
?ReferenceName: string,
6357-
?GroupName: string,
6363+
?LegendGroupData :string,
6364+
?LegendGroupReference :string,
63586365
?ShowMarkers: bool,
63596366
?ShowLegend: bool,
63606367
?Text: #IConvertible,
@@ -6394,7 +6401,8 @@ module Chart2D =
63946401
reference = reference,
63956402
?Name = Name,
63966403
?ReferenceName = ReferenceName,
6397-
?GroupName = GroupName,
6404+
?LegendGroupData = LegendGroupData,
6405+
?LegendGroupReference = LegendGroupReference,
63986406
?ShowMarkers = ShowMarkers,
63996407
?ShowLegend = ShowLegend,
64006408
?Text = Text,
@@ -6435,7 +6443,8 @@ module Chart2D =
64356443
/// <param name="referenceValue">Sets the y coordinate for reference Y value.</param>
64366444
/// <param name="Name">Sets the trace name of the Y values. The trace name appear as the legend item and on hover</param>
64376445
/// <param name="ReferenceName">Sets the trace name of the reference Y values. The trace name appear as the legend item and on hover</param>
6438-
/// <param name="GroupName">Sets the name of the legendgroup for the three traces of this plot.</param>
6446+
/// <param name="LegendGroupData">Sets the name of the legendgroup for the data distribution trace of this plot.</param>
6447+
/// <param name="LegendGroupReference">Sets the name of the legendgroup for the reference trace of this plot.</param>
64396448
/// <param name="ShowMarkers">Determines whether or not an To show markers for each datum.</param>
64406449
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
64416450
/// <param name="Text">Sets a text associated with each datum for the Y values.</param>
@@ -6472,7 +6481,8 @@ module Chart2D =
64726481
referenceValue: #IConvertible,
64736482
?Name: string,
64746483
?ReferenceName: string,
6475-
?GroupName: string,
6484+
?LegendGroupData: string,
6485+
?LegendGroupReference: string,
64766486
?ShowMarkers: bool,
64776487
?ShowLegend: bool,
64786488
?Text: #IConvertible,
@@ -6511,7 +6521,8 @@ module Chart2D =
65116521
reference = reference,
65126522
?Name = Name,
65136523
?ReferenceName = ReferenceName,
6514-
?GroupName = GroupName,
6524+
?LegendGroupData = LegendGroupData,
6525+
?LegendGroupReference = LegendGroupReference,
65156526
?ShowMarkers = ShowMarkers,
65166527
?ShowLegend = ShowLegend,
65176528
?Text = Text,

0 commit comments

Comments
 (0)