Skip to content

Commit efdb115

Browse files
committed
Add all params to BoxPlot TraceStyle
1 parent 40c9e07 commit efdb115

2 files changed

Lines changed: 131 additions & 51 deletions

File tree

src/Plotly.NET/CommonAbstractions/StyleParams.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ module StyleParam =
224224
//--------------------------
225225

226226
[<RequireQualifiedAccess>]
227-
type Boxpoints =
227+
type BoxPoints =
228228
| Outliers
229229
| All
230230
| Suspectedoutliers
@@ -236,9 +236,9 @@ module StyleParam =
236236
| Suspectedoutliers -> "suspectedoutliers"
237237
| False -> "false"
238238

239-
static member convert = Boxpoints.toString >> box
240-
override this.ToString() = this |> Boxpoints.toString
241-
member this.Convert() = this |> Boxpoints.convert
239+
static member convert = BoxPoints.toString >> box
240+
override this.ToString() = this |> BoxPoints.toString
241+
member this.Convert() = this |> BoxPoints.convert
242242

243243

244244

@@ -1235,7 +1235,7 @@ module StyleParam =
12351235
// #J#
12361236

12371237
[<RequireQualifiedAccess>]
1238-
type Jitterpoints = Boxpoints
1238+
type JitterPoints = BoxPoints
12391239

12401240
//--------------------------
12411241
// #K#

src/Plotly.NET/Traces/Trace2D.fs

Lines changed: 126 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -595,55 +595,135 @@ type Trace2DStyle() =
595595
// Applies the styles of box plot plot to TraceObjects
596596
static member BoxPlot
597597
(
598-
[<Optional;DefaultParameterValue(null)>] ?Y,
599-
[<Optional;DefaultParameterValue(null)>] ?X,
600-
[<Optional;DefaultParameterValue(null)>] ?X0,
601-
[<Optional;DefaultParameterValue(null)>] ?Y0,
602-
[<Optional;DefaultParameterValue(null)>] ?Whiskerwidth,
603-
[<Optional;DefaultParameterValue(null)>] ?Boxpoints,
604-
[<Optional;DefaultParameterValue(null)>] ?Boxmean,
605-
[<Optional;DefaultParameterValue(null)>] ?Jitter,
606-
[<Optional;DefaultParameterValue(null)>] ?Pointpos,
607-
[<Optional;DefaultParameterValue(null)>] ?Orientation,
608-
[<Optional;DefaultParameterValue(null)>] ?Fillcolor : Color,
609-
[<Optional;DefaultParameterValue(null)>] ?Marker:Marker,
610-
[<Optional;DefaultParameterValue(null)>] ?Line:Line,
611-
[<Optional;DefaultParameterValue(null)>] ?Alignmentgroup,
612-
[<Optional;DefaultParameterValue(null)>] ?Offsetgroup,
613-
[<Optional;DefaultParameterValue(null)>] ?Notched:bool,
614-
[<Optional;DefaultParameterValue(null)>] ?NotchWidth:float,
615-
[<Optional;DefaultParameterValue(null)>] ?QuartileMethod:StyleParam.QuartileMethod,
616-
[<Optional;DefaultParameterValue(null)>] ?xAxis,
617-
[<Optional;DefaultParameterValue(null)>] ?yAxis,
618-
[<Optional;DefaultParameterValue(null)>] ?Ysrc,
619-
[<Optional;DefaultParameterValue(null)>] ?Xsrc
598+
[<Optional;DefaultParameterValue(null)>] ?Name : string,
599+
[<Optional;DefaultParameterValue(null)>] ?Visible : StyleParam.Visible,
600+
[<Optional;DefaultParameterValue(null)>] ?ShowLegend : bool,
601+
[<Optional;DefaultParameterValue(null)>] ?LegendRank : int,
602+
[<Optional;DefaultParameterValue(null)>] ?LegendGroup : string,
603+
[<Optional;DefaultParameterValue(null)>] ?LegendGroupTitle : Title,
604+
[<Optional;DefaultParameterValue(null)>] ?Opacity : float,
605+
[<Optional;DefaultParameterValue(null)>] ?Ids : seq<#IConvertible>,
606+
[<Optional;DefaultParameterValue(null)>] ?X : seq<#IConvertible>,
607+
[<Optional;DefaultParameterValue(null)>] ?X0 : #IConvertible,
608+
[<Optional;DefaultParameterValue(null)>] ?DX : #IConvertible,
609+
[<Optional;DefaultParameterValue(null)>] ?Y : seq<#IConvertible>,
610+
[<Optional;DefaultParameterValue(null)>] ?Y0 : #IConvertible,
611+
[<Optional;DefaultParameterValue(null)>] ?DY : #IConvertible,
612+
[<Optional;DefaultParameterValue(null)>] ?Width : float,
613+
[<Optional;DefaultParameterValue(null)>] ?Text : #IConvertible,
614+
[<Optional;DefaultParameterValue(null)>] ?MultiText : seq<#IConvertible>,
615+
[<Optional;DefaultParameterValue(null)>] ?HoverText : string,
616+
[<Optional;DefaultParameterValue(null)>] ?MultiHoverText : seq<string>,
617+
[<Optional;DefaultParameterValue(null)>] ?HoverInfo : StyleParam.HoverInfo,
618+
[<Optional;DefaultParameterValue(null)>] ?HoverTemplate : string,
619+
[<Optional;DefaultParameterValue(null)>] ?MultiHoverTemplate: seq<string>,
620+
[<Optional;DefaultParameterValue(null)>] ?XHoverFormat : string,
621+
[<Optional;DefaultParameterValue(null)>] ?YHoverFormat : string,
622+
[<Optional;DefaultParameterValue(null)>] ?Meta : string,
623+
[<Optional;DefaultParameterValue(null)>] ?CustomData : seq<#IConvertible>,
624+
[<Optional;DefaultParameterValue(null)>] ?XAxis : StyleParam.LinearAxisId,
625+
[<Optional;DefaultParameterValue(null)>] ?YAxis : StyleParam.LinearAxisId,
626+
[<Optional;DefaultParameterValue(null)>] ?Orientation : StyleParam.Orientation,
627+
[<Optional;DefaultParameterValue(null)>] ?AlignmentGroup : string,
628+
[<Optional;DefaultParameterValue(null)>] ?OffsetGroup : string,
629+
[<Optional;DefaultParameterValue(null)>] ?XPeriod : #IConvertible,
630+
[<Optional;DefaultParameterValue(null)>] ?XPeriodAlignment : StyleParam.PeriodAlignment,
631+
[<Optional;DefaultParameterValue(null)>] ?XPeriod0 : #IConvertible,
632+
[<Optional;DefaultParameterValue(null)>] ?YPeriod : #IConvertible,
633+
[<Optional;DefaultParameterValue(null)>] ?YPeriodAlignment : StyleParam.PeriodAlignment,
634+
[<Optional;DefaultParameterValue(null)>] ?YPeriod0 : #IConvertible,
635+
[<Optional;DefaultParameterValue(null)>] ?Marker : Marker,
636+
[<Optional;DefaultParameterValue(null)>] ?Line : Line,
637+
[<Optional;DefaultParameterValue(null)>] ?BoxMean : StyleParam.BoxMean,
638+
[<Optional;DefaultParameterValue(null)>] ?BoxPoints : StyleParam.BoxPoints,
639+
[<Optional;DefaultParameterValue(null)>] ?Notched : bool,
640+
[<Optional;DefaultParameterValue(null)>] ?NotchWidth : float,
641+
[<Optional;DefaultParameterValue(null)>] ?Whiskerwidth : float,
642+
[<Optional;DefaultParameterValue(null)>] ?Q1 : seq<IConvertible>,
643+
[<Optional;DefaultParameterValue(null)>] ?Median : seq<IConvertible>,
644+
[<Optional;DefaultParameterValue(null)>] ?Q3 : seq<IConvertible>,
645+
[<Optional;DefaultParameterValue(null)>] ?LowerFence : seq<IConvertible>,
646+
[<Optional;DefaultParameterValue(null)>] ?UpperFence : seq<IConvertible>,
647+
[<Optional;DefaultParameterValue(null)>] ?NotchSpan : seq<IConvertible>,
648+
[<Optional;DefaultParameterValue(null)>] ?Mean : seq<IConvertible>,
649+
[<Optional;DefaultParameterValue(null)>] ?SD : seq<IConvertible>,
650+
[<Optional;DefaultParameterValue(null)>] ?QuartileMethod : StyleParam.QuartileMethod,
651+
[<Optional;DefaultParameterValue(null)>] ?SelectedPoints : seq<#IConvertible>,
652+
[<Optional;DefaultParameterValue(null)>] ?Selected : Selection,
653+
[<Optional;DefaultParameterValue(null)>] ?Unselected : Selection,
654+
[<Optional;DefaultParameterValue(null)>] ?FillColor : Color,
655+
[<Optional;DefaultParameterValue(null)>] ?HoverLabel : Hoverlabel,
656+
[<Optional;DefaultParameterValue(null)>] ?HoverOn : StyleParam.HoverOn,
657+
[<Optional;DefaultParameterValue(null)>] ?PointPos : float,
658+
[<Optional;DefaultParameterValue(null)>] ?Jitter : float,
659+
[<Optional;DefaultParameterValue(null)>] ?XCalendar : StyleParam.Calendar,
660+
[<Optional;DefaultParameterValue(null)>] ?YCalendar : StyleParam.Calendar,
661+
[<Optional;DefaultParameterValue(null)>] ?UIRevision : string
620662

621663
) =
622664
(fun (boxPlot:('T :> Trace)) ->
623665

624-
Y |> DynObj.setValueOpt boxPlot "y"
625-
X |> DynObj.setValueOpt boxPlot "x"
626-
X0 |> DynObj.setValueOpt boxPlot "x0"
627-
Y0 |> DynObj.setValueOpt boxPlot "y0"
628-
Whiskerwidth |> DynObj.setValueOpt boxPlot "whiskerwidth"
629-
Boxpoints |> DynObj.setValueOptBy boxPlot "boxpoints" StyleParam.Boxpoints.convert
630-
Boxmean |> DynObj.setValueOptBy boxPlot "boxmean" StyleParam.BoxMean.convert
631-
Jitter |> DynObj.setValueOpt boxPlot "jitter"
632-
Pointpos |> DynObj.setValueOpt boxPlot "pointpos"
633-
Orientation |> DynObj.setValueOptBy boxPlot "orientation" StyleParam.Orientation.convert
634-
Fillcolor |> DynObj.setValueOpt boxPlot "fillcolor"
635-
Marker |> DynObj.setValueOpt boxPlot "marker"
636-
Line |> DynObj.setValueOpt boxPlot "line"
637-
Alignmentgroup |> DynObj.setValueOpt boxPlot "alignmentgroup"
638-
Offsetgroup |> DynObj.setValueOpt boxPlot "offsetgroup"
639-
Notched |> DynObj.setValueOpt boxPlot "notched"
640-
NotchWidth |> DynObj.setValueOpt boxPlot "notchwidth"
641-
QuartileMethod |> DynObj.setValueOptBy boxPlot "quartilemethod" StyleParam.QuartileMethod.convert
642-
643-
xAxis |> DynObj.setValueOpt boxPlot "xaxis"
644-
yAxis |> DynObj.setValueOpt boxPlot "yaxis"
645-
Ysrc |> DynObj.setValueOpt boxPlot "ysrc"
646-
Xsrc |> DynObj.setValueOpt boxPlot "xsrc"
666+
Name |> DynObj.setValueOpt boxPlot "name"
667+
Visible |> DynObj.setValueOptBy boxPlot "visible" StyleParam.Visible.convert
668+
ShowLegend |> DynObj.setValueOpt boxPlot "showlegend"
669+
LegendRank |> DynObj.setValueOpt boxPlot "legendrank"
670+
LegendGroup |> DynObj.setValueOpt boxPlot "legendgroup"
671+
LegendGroupTitle |> DynObj.setValueOpt boxPlot "legendgrouptitle"
672+
Opacity |> DynObj.setValueOpt boxPlot "opacity"
673+
Ids |> DynObj.setValueOpt boxPlot "ids"
674+
X |> DynObj.setValueOpt boxPlot "x"
675+
X0 |> DynObj.setValueOpt boxPlot "x0"
676+
DX |> DynObj.setValueOpt boxPlot "dx"
677+
Y |> DynObj.setValueOpt boxPlot "y"
678+
Y0 |> DynObj.setValueOpt boxPlot "y0"
679+
DY |> DynObj.setValueOpt boxPlot "dy"
680+
Width |> DynObj.setValueOpt boxPlot "width"
681+
(Text, MultiText) |> DynObj.setSingleOrMultiOpt boxPlot "text"
682+
(HoverText, MultiHoverText) |> DynObj.setSingleOrMultiOpt boxPlot "hovertext"
683+
HoverInfo |> DynObj.setValueOptBy boxPlot "hoverinfo" StyleParam.HoverInfo.convert
684+
(HoverTemplate, MultiHoverTemplate) |> DynObj.setSingleOrMultiOpt boxPlot "hovertemplate"
685+
XHoverFormat |> DynObj.setValueOpt boxPlot "xhoverformat"
686+
YHoverFormat |> DynObj.setValueOpt boxPlot "yhoverformat"
687+
Meta |> DynObj.setValueOpt boxPlot "meta"
688+
CustomData |> DynObj.setValueOpt boxPlot "customdata"
689+
XAxis |> DynObj.setValueOptBy boxPlot "xaxis" StyleParam.LinearAxisId.convert
690+
YAxis |> DynObj.setValueOptBy boxPlot "yaxis" StyleParam.LinearAxisId.convert
691+
Orientation |> DynObj.setValueOptBy boxPlot "orientation" StyleParam.Orientation.convert
692+
AlignmentGroup |> DynObj.setValueOpt boxPlot "alignmentgroup"
693+
OffsetGroup |> DynObj.setValueOpt boxPlot "offsetgroup"
694+
XPeriod |> DynObj.setValueOpt boxPlot "xperiod"
695+
XPeriodAlignment |> DynObj.setValueOptBy boxPlot "xperiodalignment" StyleParam.PeriodAlignment.convert
696+
XPeriod0 |> DynObj.setValueOpt boxPlot "xperiod0"
697+
YPeriod |> DynObj.setValueOpt boxPlot "yperiod"
698+
YPeriodAlignment |> DynObj.setValueOptBy boxPlot "yperiodalignment" StyleParam.PeriodAlignment.convert
699+
YPeriod0 |> DynObj.setValueOpt boxPlot "yperiod0"
700+
Marker |> DynObj.setValueOpt boxPlot "marker"
701+
Line |> DynObj.setValueOpt boxPlot "line"
702+
BoxMean |> DynObj.setValueOptBy boxPlot "boxmean" StyleParam.BoxMean.convert
703+
BoxPoints |> DynObj.setValueOptBy boxPlot "boxpoints" StyleParam.BoxPoints.convert
704+
Notched |> DynObj.setValueOpt boxPlot "notched"
705+
NotchWidth |> DynObj.setValueOpt boxPlot "notchwidth"
706+
Whiskerwidth |> DynObj.setValueOpt boxPlot "whiskerwidth"
707+
Q1 |> DynObj.setValueOpt boxPlot "q1"
708+
Median |> DynObj.setValueOpt boxPlot "median"
709+
Q3 |> DynObj.setValueOpt boxPlot "q3"
710+
LowerFence |> DynObj.setValueOpt boxPlot "lowerfence"
711+
UpperFence |> DynObj.setValueOpt boxPlot "upperfence"
712+
NotchSpan |> DynObj.setValueOpt boxPlot "notchspan"
713+
Mean |> DynObj.setValueOpt boxPlot "mean"
714+
SD |> DynObj.setValueOpt boxPlot "sd"
715+
QuartileMethod |> DynObj.setValueOptBy boxPlot "quartilemethod" StyleParam.QuartileMethod.convert
716+
SelectedPoints |> DynObj.setValueOpt boxPlot "selectedpoints"
717+
Selected |> DynObj.setValueOpt boxPlot "selected"
718+
Unselected |> DynObj.setValueOpt boxPlot "unselected"
719+
FillColor |> DynObj.setValueOpt boxPlot "fillcolor"
720+
HoverLabel |> DynObj.setValueOpt boxPlot "hoverlabel"
721+
HoverOn |> DynObj.setValueOptBy boxPlot "hoveron" StyleParam.HoverOn.convert
722+
PointPos |> DynObj.setValueOpt boxPlot "pointpos"
723+
Jitter |> DynObj.setValueOpt boxPlot "jitter"
724+
XCalendar |> DynObj.setValueOptBy boxPlot "xcalendar" StyleParam.Calendar.convert
725+
YCalendar |> DynObj.setValueOptBy boxPlot "ycalendar" StyleParam.Calendar.convert
726+
UIRevision |> DynObj.setValueOpt boxPlot "uirevision"
647727

648728
// out ->
649729
boxPlot
@@ -688,7 +768,7 @@ type Trace2DStyle() =
688768
X |> DynObj.setValueOpt boxPlot "x"
689769
X0 |> DynObj.setValueOpt boxPlot "x0"
690770
Y0 |> DynObj.setValueOpt boxPlot "y0"
691-
Points |> DynObj.setValueOptBy boxPlot "points" StyleParam.Jitterpoints.convert
771+
Points |> DynObj.setValueOptBy boxPlot "points" StyleParam.JitterPoints.convert
692772
Jitter |> DynObj.setValueOpt boxPlot "jitter"
693773
Pointpos |> DynObj.setValueOpt boxPlot "pointpos"
694774
Orientation |> DynObj.setValueOptBy boxPlot "orientation" StyleParam.Orientation.convert

0 commit comments

Comments
 (0)