forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrace.fs
More file actions
1477 lines (1270 loc) · 70.8 KB
/
Copy pathTrace.fs
File metadata and controls
1477 lines (1270 loc) · 70.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
namespace Plotly.NET
open System
/// Trace type inherits from dynamic object
type Trace (traceTypeName) =
inherit DynamicObj ()
//interface ITrace with
// Implictit ITrace
member val ``type`` = traceTypeName with get,set
[<CompilationRepresentationAttribute(CompilationRepresentationFlags.ModuleSuffix)>]
module Trace =
//Trace Types
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Simple
///initializes a trace of type "scatter" applying the givin trace styling function
let initScatter (applyStyle:Trace->Trace) =
Trace("scatter") |> applyStyle
///initializes a trace of type "scattergl" applying the givin trace styling function
let initScatterGL (applyStyle:Trace->Trace) =
Trace("scattergl") |> applyStyle
///initializes a trace of type "bar" applying the givin trace styling function
let initBar (applyStyle:Trace->Trace) =
Trace("bar") |> applyStyle
///initializes a trace of type "pie" applying the givin trace styling function
let initPie (applyStyle:Trace->Trace) =
Trace("pie") |> applyStyle
///initializes a trace of type "heatmap" applying the givin trace styling function
let initHeatmap (applyStyle:Trace->Trace) =
Trace("heatmap") |> applyStyle
///initializes a trace of type "image" applying the givin trace styling function
let initImage (applyStyle:Trace->Trace) =
Trace("image") |> applyStyle
///initializes a trace of type "contour" applying the givin trace styling function
let initContour (applyStyle:Trace->Trace) =
Trace("contour") |> applyStyle
///initializes a trace of type "Table" applying the givin trace styling function
/// Init trace for table
let initTable (applyStyle:Trace->Trace) =
Trace("table") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Distributions
///initializes a trace of type "box" applying the givin trace styling function
let initBoxPlot (applyStyle:Trace->Trace) =
Trace("box") |> applyStyle
///initializes a trace of type "violin" applying the givin trace styling function
let initViolin (applyStyle:Trace->Trace) =
Trace("violin") |> applyStyle
///initializes a trace of type "histogram" applying the givin trace styling function
let initHistogram (applyStyle:Trace->Trace) =
Trace("histogram") |> applyStyle
///initializes a trace of type "histogram2d" applying the givin trace styling function
let initHistogram2d (applyStyle:Trace->Trace) =
Trace("histogram2d") |> applyStyle
///initializes a trace of type "histogram2dcontour" applying the givin trace styling function
let initHistogram2dContour (applyStyle:Trace->Trace) =
Trace("histogram2dcontour") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Finance
///initializes a trace of type "ohlc" applying the givin trace styling function
let initOHLC (applyStyle:Trace->Trace) =
Trace("ohlc") |> applyStyle
///initializes a trace of type "candlestick" applying the givin trace styling function
let initCandlestick (applyStyle:Trace->Trace) =
Trace("candlestick") |> applyStyle
///initializes a trace of type "waterfall" applying the givin trace styling function
let initWaterfall (applyStyle:Trace->Trace) =
Trace("waterfall") |> applyStyle
///initializes a trace of type "funnel" applying the givin trace styling function
let initFunnel (applyStyle:Trace->Trace) =
Trace("funnel") |> applyStyle
///initializes a trace of type "funnelarea" applying the givin trace styling function
let initFunnelArea (applyStyle:Trace->Trace) =
Trace("funnelarea") |> applyStyle
///initializes a trace of type "indicator" applying the givin trace styling function
let initIndicator (applyStyle:Trace->Trace) =
Trace("indicator") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Maps
///initializes a trace of type "scattergeo" applying the givin trace styling function
let initScatterGeo (applyStyle:Trace->Trace) =
Trace("scattergeo") |> applyStyle
///initializes a trace of type "choropleth" applying the givin trace styling function
let initChoroplethMap (applyStyle:Trace->Trace) =
Trace("choropleth") |> applyStyle
///initializes a trace of type "scattermapbox" applying the givin trace styling function
let initScatterMapbox (applyStyle:Trace->Trace) =
Trace("scattermapbox") |> applyStyle
///initializes a trace of type "choroplethmapbox" applying the givin trace styling function
let initChoroplethMapbox (applyStyle:Trace->Trace) =
Trace("choroplethmapbox") |> applyStyle
///initializes a trace of type "densitymapbox" applying the givin trace styling function
let initDensityMapbox (applyStyle:Trace->Trace) =
Trace("densitymapbox") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Specialized
///initializes a trace of type "scatterpolar" applying the givin trace styling function
let initScatterPolar (applyStyle:Trace->Trace) =
Trace("scatterpolar") |> applyStyle
///initializes a trace of type "scatterpolargl" applying the givin trace styling function
let initScatterPolarGL (applyStyle:Trace->Trace) =
Trace("scatterpolargl") |> applyStyle
///initializes a trace of type "barpolar" applying the givin trace styling function
let initBarPolar (applyStyle:Trace->Trace) =
Trace("barpolar") |> applyStyle
///initializes a trace of type "scatterternary" applying the givin trace styling function
let initScatterTernary (applyStyle:Trace->Trace) =
Trace("scatterternary") |> applyStyle
///initializes a trace of type "sunburst" applying the givin trace styling function
let initSunburst (applyStyle:Trace->Trace) =
Trace("sunburst") |> applyStyle
///initializes a trace of type "treemap" applying the givin trace styling function
let initTreemap (applyStyle:Trace->Trace) =
Trace("treemap") |> applyStyle
///initializes a trace of type "sankey" applying the givin trace styling function
let initSankey (applyStyle:Trace->Trace) =
Trace("sankey") |> applyStyle
///initializes a trace of type "SPLOM" applying the givin trace styling function
let initSplom (applyStyle:Trace->Trace) =
Trace("splom") |> applyStyle
///initializes a trace of type "parcoords" applying the givin trace styling function
let initParallelCoord (applyStyle:Trace->Trace) =
Trace("parcoords") |> applyStyle
///initializes a trace of type "parcats" applying the givin trace styling function
let initParallelCategories (applyStyle: Trace -> Trace) =
Trace("parcats") |> applyStyle
///initializes a trace of type "carpet" applying the givin trace styling function
let initCarpet (applyStyle:Trace->Trace) =
Trace("carpet") |> applyStyle
///initializes a trace of type "scattercarpet" applying the givin trace styling function
let initScatterCarpet (applyStyle:Trace->Trace) =
Trace("scattercarpet") |> applyStyle
///initializes a trace of type "contourcarpet" applying the givin trace styling function
let initContourCarpet (applyStyle:Trace->Trace) =
Trace("contourcarpet") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Custom
/// Init trace for wind rose chart
let initWindRose (applyStyle:Trace->Trace) =
Trace("area") |> applyStyle
//-------------------------------------------------------------------------------------------------------------------------------------------------
/// Functions provide the styling of the Chart objects
type TraceStyle() =
/// Applies the TraceInfo styles to TraceObjects
static member TraceInfo
(
?Name: string,
?Visible: StyleParam.Visible,
?Showlegend: bool,
?Legendgroup:string,
?Opacity: float,
?Uid: string,
?Hoverinfo: string
//?Stream: Stream
) =
(fun (trace:('T :> Trace)) ->
Name |> DynObj.setValueOpt trace "name"
Visible |> DynObj.setValueOptBy trace "visible" StyleParam.Visible.toString
Showlegend |> DynObj.setValueOpt trace "showlegend"
Legendgroup |> DynObj.setValueOpt trace "legendgroup"
Opacity |> DynObj.setValueOpt trace "opacity"
Uid |> DynObj.setValueOpt trace "uid"
Hoverinfo |> DynObj.setValueOpt trace "hoverinfo"
// Update
//Stream: Stream
// out ->
trace
)
// Sets Axis anchor id to TraceObjects
static member SetAxisAnchor
(
?X:StyleParam.AxisAnchorId,
?Y:StyleParam.AxisAnchorId,
?Z:StyleParam.AxisAnchorId
) =
(fun (trace:('T :> Trace)) ->
X |> DynObj.setValueOptBy trace "xaxis" StyleParam.AxisAnchorId.toString
Y |> DynObj.setValueOptBy trace "yaxis" StyleParam.AxisAnchorId.toString
Z |> DynObj.setValueOptBy trace "zaxis" StyleParam.AxisAnchorId.toString
trace
)
// Sets selection of data points
static member SetSelection
(
?Selectedpoints,
?Selected,
?UnSelected
) =
(fun (trace:('T :> Trace)) ->
Selectedpoints |> DynObj.setValueOpt trace "Selectedpoints"
Selected |> DynObj.setValueOpt trace "Selected"
UnSelected |> DynObj.setValueOpt trace "UnSelected"
trace
)
// Applies the styles of TextLabel to TraceObjects
static member TextLabel
(
?Text : seq<#IConvertible>,
?Textposition: StyleParam.TextPosition,
?Textfont: Font,
?Textsrc : string,
?Textpositionsrc : string
) =
(fun (trace:('T :> Trace)) ->
Text |> DynObj.setValueOpt trace "text"
Textposition |> DynObj.setValueOptBy trace "textposition" StyleParam.TextPosition.toString
Textsrc |> DynObj.setValueOpt trace "textsrc"
Textpositionsrc |> DynObj.setValueOpt trace "textpositionsrc"
Textfont |> DynObj.setValueOpt trace "textfont"
// out ->
trace
)
// Sets Line() to TraceObjects
static member SetLine
(
line:Line
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("line", line)
trace
)
// Applies the styles to Line()
static member Line
(
?Width,
?Color,
?Shape:StyleParam.Shape,
?Dash,
?Smoothing,
?Colorscale : StyleParam.Colorscale
) =
(fun (trace:('T :> Trace)) ->
let line =
match (trace.TryGetValue "line") with
| Some line -> line :?> Line
| None -> Line.init (id)
|> Line.style(?Width=Width,?Color=Color,?Shape=Shape,?Dash=Dash,?Smoothing=Smoothing,?Colorscale=Colorscale)
trace.SetValue("line", line)
trace
)
// Sets Marker() to TraceObjects
static member SetMarker
(
marker:Marker
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("marker", marker)
trace
)
// Applies the styles to Marker()
static member Marker
(
?Size:int,
?Color,
?Symbol:StyleParam.Symbol,
?Opacity:float,
?MultiSizes:seq<#IConvertible>,
?Line : Line,
?Colorbar ,
?Colorscale : StyleParam.Colorscale,
?Colors ,
?Maxdisplayed ,
?Sizeref ,
?Sizemin ,
?Sizemode ,
?Cauto ,
?Cmax ,
?Cmin ,
?Autocolorscale : bool,
?Reversescale : bool,
?Showscale : bool,
?Symbolsrc ,
?Opacitysrc ,
?Sizesrc ,
?Colorsrc ,
?Cutliercolor ,
?Colorssrc
) =
(fun (trace:('T :> Trace)) ->
let marker =
match (trace.TryGetValue "marker") with
| Some m -> m :?> Marker
| None -> Marker ()
|> Marker.style(?Size=Size,?Color=Color,?Symbol=Symbol,
?Opacity=Opacity,?MultiSizes=MultiSizes,?Line=Line,
?Colorbar=Colorbar,?Colorscale=Colorscale,?Colors=Colors,
?Maxdisplayed=Maxdisplayed,?Sizeref=Sizeref,?Sizemin=Sizemin,
?Sizemode=Sizemode,?Cauto=Cauto,?Cmax=Cmax,?Cmin=Cmin,
?Autocolorscale=Autocolorscale,?Reversescale=Reversescale,?Showscale=Showscale,
?Symbolsrc=Symbolsrc,?Opacitysrc=Opacitysrc,?Sizesrc=Sizesrc,
?Colorsrc=Colorsrc,?Cutliercolor=Cutliercolor,?Colorssrc=Colorssrc
)
trace.SetValue("marker", marker)
trace
)
// Sets X-Error() to TraceObjects
static member SetErrorX
(
error:Error
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("error_x", error)
trace
)
// Sets Y-Error() to TraceObjects
static member SetErrorY
(
error:Error
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("error_y", error)
trace
)
// Sets Z-Error() to TraceObjects
static member SetErrorZ
(
error:Error
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("error_z", error)
trace
)
// Sets Stackgroup() to TraceObjects
static member SetStackGroup
(
stackgroup: string
) =
(fun (trace:('T :> Trace)) ->
trace.SetValue("stackgroup", stackgroup)
trace
)
//#############################################################################################################################################
//# Chart trace style abstractions
//#############################################################################################################################################
//-------------------------------------------------------------------------------------------------------------------------------------------------
//Simple
/// Applies the styles of scatter plot to TraceObjects
///
/// Parameters:
///
/// X : Sets the x coordinates of the plotted data.
///
/// Y : Sets the y coordinates of the plotted data.
///
/// Mode : Determines the drawing mode for this scatter trace.
///
/// Fill : Sets the area to fill with a solid color
///
/// Fillcolor :
///
/// Connectgaps : Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
///
/// StackGroup : Set several scatter 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
///
/// Orientation : Sets the stacking direction. Only relevant when `stackgroup` is used, and only the first `orientation` found in the `stackgroup` will be used.
///
/// 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
///
/// R : [Legacy] used for polar charts. Will be removed when adding the new polar charts.
///
/// T : [Legacy] used for polar charts. Will be removed when adding the new polar charts.
///
/// Error_y : Sets vertical error bars for this this scatter trace.
///
/// Error_x : Sets horizontal error bars for this this scatter trace.
static member Scatter
(
?X : seq<#IConvertible>,
?Y : seq<#IConvertible>,
?Mode : StyleParam.Mode,
?Fill : StyleParam.Fill,
?Fillcolor : string,
?Connectgaps: bool,
?StackGroup : string,
?Orientation: StyleParam.Orientation,
?GroupNorm : StyleParam.GroupNorm,
?R : seq<#IConvertible>,
?T : seq<#IConvertible>,
?Error_y : Error,
?Error_x : Error
) =
(fun (trace:('T :> Trace)) ->
X |> DynObj.setValueOpt trace "x"
Y |> DynObj.setValueOpt trace "y"
Mode |> DynObj.setValueOptBy trace "mode" StyleParam.Mode.toString
Connectgaps |> DynObj.setValueOpt trace "connectgaps"
StackGroup |> DynObj.setValueOpt trace "stackgroup"
Orientation |> DynObj.setValueOptBy trace "orientation" StyleParam.Orientation.convert
GroupNorm |> DynObj.setValueOptBy trace "groupnorm" StyleParam.GroupNorm.convert
Fill |> DynObj.setValueOptBy trace "fill" StyleParam.Fill.toString
Fillcolor |> DynObj.setValueOpt trace "fillcolor"
R |> DynObj.setValueOpt trace "r"
T |> DynObj.setValueOpt trace "t"
Error_x |> DynObj.setValueOpt trace "error_x"
Error_y |> DynObj.setValueOpt trace "error_y"
trace
)
// Applies the styles of bar plot to TraceObjects
static member Bar
(
?X : seq<#IConvertible>,
?Y : seq<#IConvertible>,
?Marker : Marker,
?R: _, ?T: _,
?Error_y: Error,
?Error_x: Error,
//
?Orientation
) =
(fun (bar:('T :> Trace)) ->
X |> DynObj.setValueOpt bar "x"
Y |> DynObj.setValueOpt bar "y"
R |> DynObj.setValueOpt bar "r"
T |> DynObj.setValueOpt bar "t"
Orientation |> DynObj.setValueOptBy bar "orientation" StyleParam.Orientation.convert
// Update
Marker |> DynObj.setValueOpt bar "marker"
Error_x |> DynObj.setValueOpt bar "error_x"
Error_y |> DynObj.setValueOpt bar "error_y"
// out ->
bar
)
// Applies the styles of pie plot to TraceObjects
static member Pie
(
?Values,
?Labels,
?Label0,
?dLabel,
?Scalegroup,
?Textinfo,
//?Textfont: FontOptions,
?Insidetextfont: Font,
?Outsidetextfont: Font,
?Domain, // TODO
?Hole: float,
?Sort: bool,
?Direction, // TODO
?Rotation: float,
?Pull: float,
?Labelssrc: string,
?Valuessrc: string,
?Pullsrc
) =
(fun (pie:('T :> Trace)) ->
Values |> DynObj.setValueOpt pie "values"
Labels |> DynObj.setValueOpt pie "labels"
Label0 |> DynObj.setValueOpt pie "label0"
dLabel |> DynObj.setValueOpt pie "dlabel" //-- temporarily
Scalegroup |> DynObj.setValueOpt pie "scalegroup"
Textinfo |> DynObj.setValueOpt pie "textinfo"
Domain |> DynObj.setValueOpt pie "domain"
Hole |> DynObj.setValueOpt pie "hole"
Sort |> DynObj.setValueOpt pie "sort"
Direction |> DynObj.setValueOpt pie "direction"
Rotation |> DynObj.setValueOpt pie "rotation"
Pull |> DynObj.setValueOpt pie "pull"
Labelssrc |> DynObj.setValueOpt pie "labelssrc"
Valuessrc |> DynObj.setValueOpt pie "valuessrc"
Pullsrc |> DynObj.setValueOpt pie "pullsrc"
// Update
//Marker |> Option.iter (updatePropertyValueAndIgnore pie <@ pie.marker @>)
//Textfont |> Option.iter (updatePropertyValueAndIgnore pie <@ pie.textfont @>)
Insidetextfont |> DynObj.setValueOpt pie "insidetextfont"
Outsidetextfont |> DynObj.setValueOpt pie "outsidetextfont"
// out ->
pie
)
// Applies the styles of box plot plot to TraceObjects
static member BoxPlot
(
?Y,
?X,
?X0,
?Y0,
?Whiskerwidth,
?Boxpoints,
?Boxmean,
?Jitter,
?Pointpos,
?Orientation,
?Fillcolor,
?Marker:Marker,
?Line:Line,
?Alignmentgroup,
?Offsetgroup,
?Notched:bool,
?NotchWidth:float,
?QuartileMethod:StyleParam.QuartileMethod,
?xAxis,
?yAxis,
?Ysrc,
?Xsrc
) =
(fun (boxPlot:('T :> Trace)) ->
Y |> DynObj.setValueOpt boxPlot "y"
X |> DynObj.setValueOpt boxPlot "x"
X0 |> DynObj.setValueOpt boxPlot "x0"
Y0 |> DynObj.setValueOpt boxPlot "y0"
Whiskerwidth |> DynObj.setValueOpt boxPlot "whiskerwidth"
Boxpoints |> DynObj.setValueOptBy boxPlot "boxpoints" StyleParam.Boxpoints.convert
Boxmean |> DynObj.setValueOptBy boxPlot "boxmean" StyleParam.BoxMean.convert
Jitter |> DynObj.setValueOpt boxPlot "jitter"
Pointpos |> DynObj.setValueOpt boxPlot "pointpos"
Orientation |> DynObj.setValueOptBy boxPlot "orientation" StyleParam.Orientation.convert
Fillcolor |> DynObj.setValueOpt boxPlot "fillcolor"
Marker |> DynObj.setValueOpt boxPlot "marker"
Line |> DynObj.setValueOpt boxPlot "line"
Alignmentgroup |> DynObj.setValueOpt boxPlot "alignmentgroup"
Offsetgroup |> DynObj.setValueOpt boxPlot "offsetgroup"
Notched |> DynObj.setValueOpt boxPlot "notched"
NotchWidth |> DynObj.setValueOpt boxPlot "notchwidth"
QuartileMethod |> DynObj.setValueOptBy boxPlot "quartilemethod" StyleParam.QuartileMethod.convert
xAxis |> DynObj.setValueOpt boxPlot "xaxis"
yAxis |> DynObj.setValueOpt boxPlot "yaxis"
Ysrc |> DynObj.setValueOpt boxPlot "ysrc"
Xsrc |> DynObj.setValueOpt boxPlot "xsrc"
// out ->
boxPlot
)
// Applies the styles of violin plot plot to TraceObjects
static member Violin
(
?Y,
?X,
?X0,
?Y0,
?Width,
?Marker:Marker,
?Line:Line,
?Alignmentgroup,
?Offsetgroup,
?Box:Box,
?Bandwidth,
?Meanline:Meanline,
?Scalegroup,
?Scalemode,
?Side,
?Span,
?SpanMode,
?Uirevision,
?Points,
?Jitter,
?Pointpos,
?Orientation,
?Fillcolor,
?xAxis,
?yAxis,
?Ysrc,
?Xsrc
) =
(fun (boxPlot:('T :> Trace)) ->
Y |> DynObj.setValueOpt boxPlot "y"
X |> DynObj.setValueOpt boxPlot "x"
X0 |> DynObj.setValueOpt boxPlot "x0"
Y0 |> DynObj.setValueOpt boxPlot "y0"
Points |> DynObj.setValueOptBy boxPlot "points" StyleParam.Jitterpoints.convert
Jitter |> DynObj.setValueOpt boxPlot "jitter"
Pointpos |> DynObj.setValueOpt boxPlot "pointpos"
Orientation |> DynObj.setValueOptBy boxPlot "orientation" StyleParam.Orientation.convert
Fillcolor |> DynObj.setValueOpt boxPlot "fillcolor"
Width |> DynObj.setValueOpt boxPlot "width"
Marker |> DynObj.setValueOpt boxPlot "marker"
Line |> DynObj.setValueOpt boxPlot "line"
Alignmentgroup |> DynObj.setValueOpt boxPlot "alignmentgroup"
Offsetgroup |> DynObj.setValueOpt boxPlot "offsetgroup"
Box |> DynObj.setValueOpt boxPlot "box"
Bandwidth |> DynObj.setValueOpt boxPlot "bandwidth"
Meanline |> DynObj.setValueOpt boxPlot "meanline"
Scalegroup |> DynObj.setValueOpt boxPlot "scalegroup"
Scalemode |> DynObj.setValueOpt boxPlot "scalemode"
Side |> DynObj.setValueOpt boxPlot "side"
Span |> DynObj.setValueOpt boxPlot "span"
SpanMode |> DynObj.setValueOpt boxPlot "spanmode"
Uirevision |> DynObj.setValueOpt boxPlot "uirevision"
xAxis |> DynObj.setValueOpt boxPlot "xaxis"
yAxis |> DynObj.setValueOpt boxPlot "yaxis"
Ysrc |> DynObj.setValueOpt boxPlot "ysrc"
Xsrc |> DynObj.setValueOpt boxPlot "xsrc"
// out ->
boxPlot
)
// Applies the styles of heatmap to TraceObjects
static member Heatmap
(
?Z : seq<#seq<#IConvertible>>,
?X : seq<#IConvertible>,
?Y : seq<#IConvertible>,
?X0 ,
?dX ,
?Y0 ,
?dY ,
?xType ,
?yType ,
?xAxis ,
?yAxis ,
?Zsrc ,
?Xsrc ,
?Ysrc ,
?Xgap ,
?Ygap ,
?Transpose ,
?zAuto ,
?zMin ,
?zMax ,
?Colorscale ,
?Autocolorscale ,
?Reversescale ,
?Showscale ,
?zSmooth ,
?Colorbar
) =
(fun (heatmap:('T :> Trace)) ->
Z |> DynObj.setValueOpt heatmap "z"
X |> DynObj.setValueOpt heatmap "x"
Y |> DynObj.setValueOpt heatmap "y"
X0 |> DynObj.setValueOpt heatmap "x0"
dX |> DynObj.setValueOpt heatmap "dx"
Y0 |> DynObj.setValueOpt heatmap "y0"
dY |> DynObj.setValueOpt heatmap "dy"
xType |> DynObj.setValueOpt heatmap "xtype"
yType |> DynObj.setValueOpt heatmap "ytype"
xAxis |> DynObj.setValueOpt heatmap "xaxis"
yAxis |> DynObj.setValueOpt heatmap "yaxis"
Zsrc |> DynObj.setValueOpt heatmap "zsrc"
Xsrc |> DynObj.setValueOpt heatmap "xsrc"
Ysrc |> DynObj.setValueOpt heatmap "ysrc"
Xgap |> DynObj.setValueOpt heatmap "xgap"
Ygap |> DynObj.setValueOpt heatmap "ygap"
Transpose |> DynObj.setValueOpt heatmap "transpose"
zAuto |> DynObj.setValueOpt heatmap "zauto"
zMin |> DynObj.setValueOpt heatmap "zmin"
zMax |> DynObj.setValueOpt heatmap "zmax"
Colorscale |> DynObj.setValueOptBy heatmap "colorscale" StyleParam.Colorscale.convert
Autocolorscale |> DynObj.setValueOpt heatmap "autocolorscale"
Reversescale |> DynObj.setValueOpt heatmap "reversescale"
Showscale |> DynObj.setValueOpt heatmap "showscale"
zSmooth |> DynObj.setValueOptBy heatmap "zsmooth" StyleParam.SmoothAlg.convert
Colorbar |> DynObj.setValueOpt heatmap "colorbar"
// out ->
heatmap
)
static member Contour
(
?Z : seq<#seq<#IConvertible>>,
?X : seq<#IConvertible>,
?Y : seq<#IConvertible>,
?X0 ,
?dX ,
?Y0 ,
?dY ,
?xType ,
?yType ,
?xAxis ,
?yAxis ,
?Zsrc ,
?Xsrc ,
?Ysrc ,
?Xgap ,
?Ygap ,
?Transpose ,
?zAuto ,
?zMin ,
?zMax ,
?Colorscale ,
?Autocolorscale ,
?Reversescale ,
?Showscale ,
?zSmooth ,
?Colorbar
) =
(fun (contour:('T :> Trace)) ->
Z |> DynObj.setValueOpt contour "z"
X |> DynObj.setValueOpt contour "x"
Y |> DynObj.setValueOpt contour "y"
X0 |> DynObj.setValueOpt contour "x0"
dX |> DynObj.setValueOpt contour "dx"
Y0 |> DynObj.setValueOpt contour "y0"
dY |> DynObj.setValueOpt contour "dy"
xType |> DynObj.setValueOpt contour "xtype"
yType |> DynObj.setValueOpt contour "ytype"
xAxis |> DynObj.setValueOpt contour "xaxis"
yAxis |> DynObj.setValueOpt contour "yaxis"
Zsrc |> DynObj.setValueOpt contour "zsrc"
Xsrc |> DynObj.setValueOpt contour "xsrc"
Ysrc |> DynObj.setValueOpt contour "ysrc"
Xgap |> DynObj.setValueOpt contour "xgap"
Ygap |> DynObj.setValueOpt contour "ygap"
Transpose |> DynObj.setValueOpt contour "transpose"
zAuto |> DynObj.setValueOpt contour "zauto"
zMin |> DynObj.setValueOpt contour "zmin"
zMax |> DynObj.setValueOpt contour "zmax"
Colorscale |> DynObj.setValueOptBy contour "colorscale" StyleParam.Colorscale.convert
Autocolorscale |> DynObj.setValueOpt contour "autocolorscale"
Reversescale |> DynObj.setValueOpt contour "reversescale"
Showscale |> DynObj.setValueOpt contour "showscale"
zSmooth |> DynObj.setValueOptBy contour "zsmooth" StyleParam.SmoothAlg.convert
Colorbar |> DynObj.setValueOpt contour "colorbar"
// out ->
contour
)
// Applies the styles of histogram to TraceObjects
static member Histogram
(
?X : seq<#IConvertible> ,
?Y : seq<#IConvertible> ,
?Text : seq<string> ,
?xAxis ,
?yAxis ,
?Xsrc ,
?Ysrc ,
?Orientation ,
?HistFunc ,
?HistNorm ,
?Cumulative : Cumulative ,
?Autobinx : bool ,
?nBinsx : int ,
?xBins : Bins ,
?Autobiny : bool ,
?nBinsy : int ,
?yBins : Bins ,
?Marker : Marker ,
?xError : Error ,
?yError : Error
) =
(fun (histogram:('T :> Trace)) ->
X |> DynObj.setValueOpt histogram "x"
Y |> DynObj.setValueOpt histogram "y"
Text |> DynObj.setValueOpt histogram "text"
xAxis |> DynObj.setValueOpt histogram "xaxis"
yAxis |> DynObj.setValueOpt histogram "yaxis"
Xsrc |> DynObj.setValueOpt histogram "xsrc"
Ysrc |> DynObj.setValueOpt histogram "ysrc"
Orientation |> DynObj.setValueOptBy histogram "orientation" StyleParam.Orientation.convert
HistFunc |> DynObj.setValueOptBy histogram "histfunc" StyleParam.HistFunc.convert
HistNorm |> DynObj.setValueOptBy histogram "histnorm" StyleParam.HistNorm.convert
Cumulative |> DynObj.setValueOpt histogram "cumulative"
Autobinx |> DynObj.setValueOpt histogram "autobinx"
nBinsx |> DynObj.setValueOpt histogram "nbinsx"
xBins |> DynObj.setValueOpt histogram "xbins"
Autobiny |> DynObj.setValueOpt histogram "autobiny"
nBinsy |> DynObj.setValueOpt histogram "nbinsy"
yBins |> DynObj.setValueOpt histogram "ybins"
// Update
Marker |> DynObj.setValueOpt histogram "marker"
xError |> DynObj.setValueOpt histogram "error_x"
yError |> DynObj.setValueOpt histogram "error_y"
// out ->
histogram
)
static member Histogram2d
(
?X : seq<#IConvertible> ,
?Y : seq<#IConvertible> ,
?Z : seq<#seq<#IConvertible>> ,
?X0 ,
?dX ,
?Y0 ,
?dY ,
?xType ,
?yType ,
?xAxis ,
?yAxis ,
?Zsrc ,
?Xsrc ,
?Ysrc ,
?Marker : Marker ,
?Orientation ,
//?Connectgaps : bool ,
?HistFunc ,
?HistNorm ,
?Autobinx : bool ,
?nBinsx : int ,
?xBins : Bins ,
?Autobiny : bool ,
?nBinsy : int ,
?yBins : Bins ,
?Xgap ,
?Ygap ,
?Transpose ,
?zAuto ,
?zMin ,
?zMax ,
?Colorscale ,
?Autocolorscale ,
?Reversescale ,
?Showscale ,
?zSmooth ,
?Colorbar
) =
(fun (histogram2d:('T :> Trace)) ->
Z |> DynObj.setValueOpt histogram2d "z"
X |> DynObj.setValueOpt histogram2d "x"
Y |> DynObj.setValueOpt histogram2d "y"
X0 |> DynObj.setValueOpt histogram2d "x0"
dX |> DynObj.setValueOpt histogram2d "dx"
Y0 |> DynObj.setValueOpt histogram2d "y0"
dY |> DynObj.setValueOpt histogram2d "dy"
xType |> DynObj.setValueOpt histogram2d "xtype"
yType |> DynObj.setValueOpt histogram2d "ytype"
xAxis |> DynObj.setValueOpt histogram2d "xaxis"
yAxis |> DynObj.setValueOpt histogram2d "yaxis"
Zsrc |> DynObj.setValueOpt histogram2d "zsrc"
Xsrc |> DynObj.setValueOpt histogram2d "xsrc"
Ysrc |> DynObj.setValueOpt histogram2d "ysrc"
Orientation |> DynObj.setValueOptBy histogram2d "orientation" StyleParam.Orientation.convert
//Connectgaps |> DynObj.setValueOptBy histogram2d "connectgaps" StyleParam.Orientation.convert
HistFunc |> DynObj.setValueOptBy histogram2d "histfunc " StyleParam.HistFunc.convert
HistNorm |> DynObj.setValueOptBy histogram2d "histnorm " StyleParam.HistNorm.convert
Autobinx |> DynObj.setValueOpt histogram2d "autobinx"
nBinsx |> DynObj.setValueOpt histogram2d "nbinsx"
xBins |> DynObj.setValueOpt histogram2d "xbins"
Autobiny |> DynObj.setValueOpt histogram2d "autobiny"
nBinsy |> DynObj.setValueOpt histogram2d "nbinsy"
yBins |> DynObj.setValueOpt histogram2d "ybins"
Xgap |> DynObj.setValueOpt histogram2d "xgap"
Ygap |> DynObj.setValueOpt histogram2d "ygap"
Transpose |> DynObj.setValueOpt histogram2d "transpose"
zAuto |> DynObj.setValueOpt histogram2d "zauto"
zMin |> DynObj.setValueOpt histogram2d "zmin"
zMax |> DynObj.setValueOpt histogram2d "zmax"
Colorscale |> DynObj.setValueOptBy histogram2d "colorscale" StyleParam.Colorscale.convert
Autocolorscale |> DynObj.setValueOpt histogram2d "autocolorscale"
Reversescale |> DynObj.setValueOpt histogram2d "reversescale"
Showscale |> DynObj.setValueOpt histogram2d "showscale"
zSmooth |> DynObj.setValueOptBy histogram2d "zsmooth" StyleParam.SmoothAlg.convert
Colorbar |> DynObj.setValueOpt histogram2d "colorbar"
// Update
Marker |> DynObj.setValueOpt histogram2d "marker"
// out ->
histogram2d
)
static member Histogram2dContour
(
?X : seq<#IConvertible> ,
?Y : seq<#IConvertible> ,
?Z : seq<#seq<#IConvertible>> ,
?X0 ,