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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
#[allow(unused_imports)]
use serde::Serialize;

/// Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second quartile (Q2, i.e. the median) is marked by a line inside the box. The fences grow outward from the boxes' edges, by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1), The sample mean and standard deviation as well as notches and the sample, outlier and suspected outliers points can be optionally added to the box plot. The values and positions corresponding to each boxes can be input using two signatures. The first signature expects users to supply the sample values in the `y` data array for vertical boxes (`x` for horizontal boxes). By supplying an `x` (`y`) array, one box per distinct `x` (`y`) value is drawn If no `x` (`y`) {array} is provided, a single box is drawn. In this case, the box is positioned with the trace `name` or with `x0` (`y0`) if provided. The second signature expects users to supply the boxes corresponding Q1, median and Q3 statistics in the `q1`, `median` and `q3` data arrays respectively. Other box features relying on statistics namely `lowerfence`, `upperfence`, `notchspan` can be set directly by the users. To have plotly compute them or to show sample points besides the boxes, users can set the `y` data array for vertical boxes (`x` for horizontal boxes) to a 2D array with the outer length corresponding to the number of boxes in the traces and the inner length corresponding the sample size.
#[derive(Default, Serialize)]
pub struct Box<'a> {
    #[serde(rename = "visible")]
    #[serde(skip_serializing_if = "Option::is_none")]
    visible: Option<Visible>,
    #[serde(rename = "showlegend")]
    #[serde(skip_serializing_if = "Option::is_none")]
    showlegend: Option<bool>,
    #[serde(rename = "legendgroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    legendgroup: Option<&'a str>,
    #[serde(rename = "opacity")]
    #[serde(skip_serializing_if = "Option::is_none")]
    opacity: Option<f64>,
    #[serde(rename = "uid")]
    #[serde(skip_serializing_if = "Option::is_none")]
    uid: Option<&'a str>,
    #[serde(rename = "ids")]
    #[serde(skip_serializing_if = "Option::is_none")]
    ids: Option<&'a [&'a str]>,
    #[serde(rename = "meta")]
    #[serde(skip_serializing_if = "Option::is_none")]
    meta: Option<crate::Any>,
    #[serde(rename = "selectedpoints")]
    #[serde(skip_serializing_if = "Option::is_none")]
    selectedpoints: Option<crate::Any>,
    #[serde(rename = "hoverinfo")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    hoverinfo: crate::IsEmpty<Hoverinfo>,
    #[serde(rename = "hoverlabel")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    hoverlabel: crate::IsEmpty<Hoverlabel<'a>>,
    #[serde(rename = "stream")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    stream: crate::IsEmpty<Stream<'a>>,
    #[serde(rename = "uirevision")]
    #[serde(skip_serializing_if = "Option::is_none")]
    uirevision: Option<crate::Any>,
    #[serde(rename = "y")]
    #[serde(skip_serializing_if = "Option::is_none")]
    y: Option<&'a [f64]>,
    #[serde(rename = "x")]
    #[serde(skip_serializing_if = "Option::is_none")]
    x: Option<&'a [f64]>,
    #[serde(rename = "x0")]
    #[serde(skip_serializing_if = "Option::is_none")]
    x_0: Option<crate::Any>,
    #[serde(rename = "y0")]
    #[serde(skip_serializing_if = "Option::is_none")]
    y_0: Option<crate::Any>,
    #[serde(rename = "dx")]
    #[serde(skip_serializing_if = "Option::is_none")]
    dx: Option<f64>,
    #[serde(rename = "dy")]
    #[serde(skip_serializing_if = "Option::is_none")]
    dy: Option<f64>,
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    name: Option<&'a str>,
    #[serde(rename = "q1")]
    #[serde(skip_serializing_if = "Option::is_none")]
    q_1: Option<&'a [f64]>,
    #[serde(rename = "median")]
    #[serde(skip_serializing_if = "Option::is_none")]
    median: Option<&'a [f64]>,
    #[serde(rename = "q3")]
    #[serde(skip_serializing_if = "Option::is_none")]
    q_3: Option<&'a [f64]>,
    #[serde(rename = "lowerfence")]
    #[serde(skip_serializing_if = "Option::is_none")]
    lowerfence: Option<&'a [f64]>,
    #[serde(rename = "upperfence")]
    #[serde(skip_serializing_if = "Option::is_none")]
    upperfence: Option<&'a [f64]>,
    #[serde(rename = "notched")]
    #[serde(skip_serializing_if = "Option::is_none")]
    notched: Option<bool>,
    #[serde(rename = "notchwidth")]
    #[serde(skip_serializing_if = "Option::is_none")]
    notchwidth: Option<f64>,
    #[serde(rename = "notchspan")]
    #[serde(skip_serializing_if = "Option::is_none")]
    notchspan: Option<&'a [f64]>,
    #[serde(rename = "boxpoints")]
    #[serde(skip_serializing_if = "Option::is_none")]
    boxpoints: Option<Boxpoints>,
    #[serde(rename = "jitter")]
    #[serde(skip_serializing_if = "Option::is_none")]
    jitter: Option<f64>,
    #[serde(rename = "pointpos")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pointpos: Option<f64>,
    #[serde(rename = "boxmean")]
    #[serde(skip_serializing_if = "Option::is_none")]
    boxmean: Option<Boxmean>,
    #[serde(rename = "mean")]
    #[serde(skip_serializing_if = "Option::is_none")]
    mean: Option<&'a [f64]>,
    #[serde(rename = "sd")]
    #[serde(skip_serializing_if = "Option::is_none")]
    sd: Option<&'a [f64]>,
    #[serde(rename = "orientation")]
    #[serde(skip_serializing_if = "Option::is_none")]
    orientation: Option<Orientation>,
    #[serde(rename = "quartilemethod")]
    #[serde(skip_serializing_if = "Option::is_none")]
    quartilemethod: Option<Quartilemethod>,
    #[serde(rename = "width")]
    #[serde(skip_serializing_if = "Option::is_none")]
    width: Option<f64>,
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    marker: crate::IsEmpty<Marker<'a>>,
    #[serde(rename = "line")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    line: crate::IsEmpty<Line<'a>>,
    #[serde(rename = "fillcolor")]
    #[serde(skip_serializing_if = "Option::is_none")]
    fillcolor: Option<&'a str>,
    #[serde(rename = "whiskerwidth")]
    #[serde(skip_serializing_if = "Option::is_none")]
    whiskerwidth: Option<f64>,
    #[serde(rename = "offsetgroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    offsetgroup: Option<&'a str>,
    #[serde(rename = "alignmentgroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    alignmentgroup: Option<&'a str>,
    #[serde(rename = "selected")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    selected: crate::IsEmpty<Selected<'a>>,
    #[serde(rename = "unselected")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    unselected: crate::IsEmpty<Unselected<'a>>,
    #[serde(rename = "text")]
    #[serde(skip_serializing_if = "Option::is_none")]
    text: Option<&'a str>,
    #[serde(rename = "hovertext")]
    #[serde(skip_serializing_if = "Option::is_none")]
    hovertext: Option<&'a str>,
    #[serde(rename = "hovertemplate")]
    #[serde(skip_serializing_if = "Option::is_none")]
    hovertemplate: Option<&'a str>,
    #[serde(rename = "hoveron")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    hoveron: crate::IsEmpty<Hoveron>,
    #[serde(rename = "xcalendar")]
    #[serde(skip_serializing_if = "Option::is_none")]
    xcalendar: Option<Xcalendar>,
    #[serde(rename = "ycalendar")]
    #[serde(skip_serializing_if = "Option::is_none")]
    ycalendar: Option<Ycalendar>,
    #[serde(rename = "xaxis")]
    #[serde(skip_serializing_if = "Option::is_none")]
    xaxis: Option<&'a str>,
    #[serde(rename = "yaxis")]
    #[serde(skip_serializing_if = "Option::is_none")]
    yaxis: Option<&'a str>,
    #[serde(rename = "idssrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    idssrc: Option<&'a str>,
    #[serde(rename = "customdatasrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    customdatasrc: Option<&'a str>,
    #[serde(rename = "metasrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    metasrc: Option<&'a str>,
    #[serde(rename = "hoverinfosrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    hoverinfosrc: Option<&'a str>,
    #[serde(rename = "ysrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    ysrc: Option<&'a str>,
    #[serde(rename = "xsrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    xsrc: Option<&'a str>,
    #[serde(rename = "q1src")]
    #[serde(skip_serializing_if = "Option::is_none")]
    q_1_src: Option<&'a str>,
    #[serde(rename = "mediansrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    mediansrc: Option<&'a str>,
    #[serde(rename = "q3src")]
    #[serde(skip_serializing_if = "Option::is_none")]
    q_3_src: Option<&'a str>,
    #[serde(rename = "lowerfencesrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    lowerfencesrc: Option<&'a str>,
    #[serde(rename = "upperfencesrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    upperfencesrc: Option<&'a str>,
    #[serde(rename = "notchspansrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    notchspansrc: Option<&'a str>,
    #[serde(rename = "meansrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    meansrc: Option<&'a str>,
    #[serde(rename = "sdsrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    sdsrc: Option<&'a str>,
    #[serde(rename = "textsrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    textsrc: Option<&'a str>,
    #[serde(rename = "hovertextsrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    hovertextsrc: Option<&'a str>,
    #[serde(rename = "hovertemplatesrc")]
    #[serde(skip_serializing_if = "Option::is_none")]
    hovertemplatesrc: Option<&'a str>,
}

impl<'a> Box<'a> {
    /// Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
    ///
    /// default: `true`
    pub fn visible(&mut self, visible: Visible) -> &mut Self {
        self.visible = Some(visible);
        self
    }
    /// Determines whether or not an item corresponding to this trace is shown in the legend.
    ///
    /// default: `true`
    pub fn showlegend(&mut self, showlegend: bool) -> &mut Self {
        self.showlegend = Some(showlegend);
        self
    }
    /// Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.
    ///
    /// default: ``
    pub fn legendgroup(&mut self, legendgroup: &'a str) -> &mut Self {
        self.legendgroup = Some(legendgroup);
        self
    }
    /// Sets the opacity of the trace.
    ///
    /// default: `1`
    pub fn opacity(&mut self, opacity: f64) -> &mut Self {
        self.opacity = Some(opacity);
        self
    }
    /// Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
    ///
    pub fn uid(&mut self, uid: &'a str) -> &mut Self {
        self.uid = Some(uid);
        self
    }
    /// 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.
    ///
    pub fn ids(&mut self, ids: &'a [&'a str]) -> &mut Self {
        self.ids = Some(ids);
        self
    }
    /// 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.
    ///
    pub fn meta(&mut self, meta: crate::Any) -> &mut Self {
        self.meta = Some(meta);
        self
    }
    /// 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.
    ///
    pub fn selectedpoints(&mut self, selectedpoints: crate::Any) -> &mut Self {
        self.selectedpoints = Some(selectedpoints);
        self
    }
    /// Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.
    ///
    /// default: `all`
    pub fn hoverinfo(&mut self) -> &mut Hoverinfo {
        self.hoverinfo.is_empty = false;
        &mut self.hoverinfo.data
    }
    pub fn hoverlabel(&mut self) -> &mut Hoverlabel<'a> {
        self.hoverlabel.is_empty = false;
        &mut self.hoverlabel.data
    }
    pub fn stream(&mut self) -> &mut Stream<'a> {
        self.stream.is_empty = false;
        &mut self.stream.data
    }
    /// Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves.
    ///
    pub fn uirevision(&mut self, uirevision: crate::Any) -> &mut Self {
        self.uirevision = Some(uirevision);
        self
    }
    /// Sets the y sample data or coordinates. See overview for more info.
    ///
    pub fn y(&mut self, y: &'a [f64]) -> &mut Self {
        self.y = Some(y);
        self
    }
    /// Sets the x sample data or coordinates. See overview for more info.
    ///
    pub fn x(&mut self, x: &'a [f64]) -> &mut Self {
        self.x = Some(x);
        self
    }
    /// Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
    ///
    pub fn x_0(&mut self, x_0: crate::Any) -> &mut Self {
        self.x_0 = Some(x_0);
        self
    }
    /// Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
    ///
    pub fn y_0(&mut self, y_0: crate::Any) -> &mut Self {
        self.y_0 = Some(y_0);
        self
    }
    /// Sets the x coordinate step for multi-box traces set using q1/median/q3.
    ///
    pub fn dx(&mut self, dx: f64) -> &mut Self {
        self.dx = Some(dx);
        self
    }
    /// Sets the y coordinate step for multi-box traces set using q1/median/q3.
    ///
    pub fn dy(&mut self, dy: f64) -> &mut Self {
        self.dy = Some(dy);
        self
    }
    /// Sets the trace name. The trace name appear as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical
    ///
    pub fn name(&mut self, name: &'a str) -> &mut Self {
        self.name = Some(name);
        self
    }
    /// Sets the Quartile 1 values. There should be as many items as the number of boxes desired.
    ///
    pub fn q_1(&mut self, q_1: &'a [f64]) -> &mut Self {
        self.q_1 = Some(q_1);
        self
    }
    /// Sets the median values. There should be as many items as the number of boxes desired.
    ///
    pub fn median(&mut self, median: &'a [f64]) -> &mut Self {
        self.median = Some(median);
        self
    }
    /// Sets the Quartile 3 values. There should be as many items as the number of boxes desired.
    ///
    pub fn q_3(&mut self, q_3: &'a [f64]) -> &mut Self {
        self.q_3 = Some(q_3);
        self
    }
    /// Sets the lower fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `lowerfence` is not provided but a sample (in `y` or `x`) is set, we compute the lower as the last sample point below 1.5 times the IQR.
    ///
    pub fn lowerfence(&mut self, lowerfence: &'a [f64]) -> &mut Self {
        self.lowerfence = Some(lowerfence);
        self
    }
    /// Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `upperfence` is not provided but a sample (in `y` or `x`) is set, we compute the lower as the last sample point above 1.5 times the IQR.
    ///
    pub fn upperfence(&mut self, upperfence: &'a [f64]) -> &mut Self {
        self.upperfence = Some(upperfence);
        self
    }
    /// Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes' notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info. Defaults to *false* unless `notchwidth` or `notchspan` is set.
    ///
    pub fn notched(&mut self, notched: bool) -> &mut Self {
        self.notched = Some(notched);
        self
    }
    /// Sets the width of the notches relative to the box' width. For example, with 0, the notches are as wide as the box(es).
    ///
    /// default: `0.25`
    pub fn notchwidth(&mut self, notchwidth: f64) -> &mut Self {
        self.notchwidth = Some(notchwidth);
        self
    }
    /// Sets the notch span from the boxes' `median` values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `notchspan` is not provided but a sample (in `y` or `x`) is set, we compute it as 1.57 * IQR / sqrt(N), where N is the sample size.
    ///
    pub fn notchspan(&mut self, notchspan: &'a [f64]) -> &mut Self {
        self.notchspan = Some(notchspan);
        self
    }
    /// If *outliers*, only the sample points lying outside the whiskers are shown If *suspectedoutliers*, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see `outliercolor`) If *all*, all sample points are shown If *false*, only the box(es) are shown with no sample points Defaults to *suspectedoutliers* when `marker.outliercolor` or `marker.line.outliercolor` is set. Defaults to *all* under the q1/median/q3 signature. Otherwise defaults to *outliers*.
    ///
    pub fn boxpoints(&mut self, boxpoints: Boxpoints) -> &mut Self {
        self.boxpoints = Some(boxpoints);
        self
    }
    /// Sets the amount of jitter in the sample points drawn. If *0*, the sample points align along the distribution axis. If *1*, the sample points are drawn in a random jitter of width equal to the width of the box(es).
    ///
    pub fn jitter(&mut self, jitter: f64) -> &mut Self {
        self.jitter = Some(jitter);
        self
    }
    /// Sets the position of the sample points in relation to the box(es). If *0*, the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes
    ///
    pub fn pointpos(&mut self, pointpos: f64) -> &mut Self {
        self.pointpos = Some(pointpos);
        self
    }
    /// If *true*, the mean of the box(es)' underlying distribution is drawn as a dashed line inside the box(es). If *sd* the standard deviation is also drawn. Defaults to *true* when `mean` is set. Defaults to *sd* when `sd` is set Otherwise defaults to *false*.
    ///
    pub fn boxmean(&mut self, boxmean: Boxmean) -> &mut Self {
        self.boxmean = Some(boxmean);
        self
    }
    /// Sets the mean values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `mean` is not provided but a sample (in `y` or `x`) is set, we compute the mean for each box using the sample values.
    ///
    pub fn mean(&mut self, mean: &'a [f64]) -> &mut Self {
        self.mean = Some(mean);
        self
    }
    /// Sets the standard deviation values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If `sd` is not provided but a sample (in `y` or `x`) is set, we compute the standard deviation for each box using the sample values.
    ///
    pub fn sd(&mut self, sd: &'a [f64]) -> &mut Self {
        self.sd = Some(sd);
        self
    }
    /// Sets the orientation of the box(es). If *v* (*h*), the distribution is visualized along the vertical (horizontal).
    ///
    pub fn orientation(&mut self, orientation: Orientation) -> &mut Self {
        self.orientation = Some(orientation);
        self
    }
    /// Sets the method used to compute the sample's Q1 and Q3 quartiles. The *linear* method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The *exclusive* method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The *inclusive* method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
    ///
    /// default: `linear`
    pub fn quartilemethod(&mut self, quartilemethod: Quartilemethod) -> &mut Self {
        self.quartilemethod = Some(quartilemethod);
        self
    }
    /// Sets the width of the box in data coordinate If *0* (default value) the width is automatically selected based on the positions of other box traces in the same subplot.
    ///
    /// default: `0`
    pub fn width(&mut self, width: f64) -> &mut Self {
        self.width = Some(width);
        self
    }
    pub fn marker(&mut self) -> &mut Marker<'a> {
        self.marker.is_empty = false;
        &mut self.marker.data
    }
    pub fn line(&mut self) -> &mut Line<'a> {
        self.line.is_empty = false;
        &mut self.line.data
    }
    /// Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
    ///
    pub fn fillcolor(&mut self, fillcolor: &'a str) -> &mut Self {
        self.fillcolor = Some(fillcolor);
        self
    }
    /// Sets the width of the whiskers relative to the box' width. For example, with 1, the whiskers are as wide as the box(es).
    ///
    /// default: `0.5`
    pub fn whiskerwidth(&mut self, whiskerwidth: f64) -> &mut Self {
        self.whiskerwidth = Some(whiskerwidth);
        self
    }
    /// Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
    ///
    /// default: ``
    pub fn offsetgroup(&mut self, offsetgroup: &'a str) -> &mut Self {
        self.offsetgroup = Some(offsetgroup);
        self
    }
    /// Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
    ///
    /// default: ``
    pub fn alignmentgroup(&mut self, alignmentgroup: &'a str) -> &mut Self {
        self.alignmentgroup = Some(alignmentgroup);
        self
    }
    pub fn selected(&mut self) -> &mut Selected<'a> {
        self.selected.is_empty = false;
        &mut self.selected.data
    }
    pub fn unselected(&mut self) -> &mut Unselected<'a> {
        self.unselected.is_empty = false;
        &mut self.unselected.data
    }
    /// Sets the text elements associated with each sample value. 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. To be seen, trace `hoverinfo` must contain a *text* flag.
    ///
    /// default: ``
    pub fn text(&mut self, text: &'a str) -> &mut Self {
        self.text = Some(text);
        self
    }
    /// Same as `text`.
    ///
    /// default: ``
    pub fn hovertext(&mut self, hovertext: &'a str) -> &mut Self {
        self.hovertext = Some(hovertext);
        self
    }
    /// Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. 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-3.x-api-reference/blob/master/Formatting.md#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-3.x-api-reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.  Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>". To hide the secondary box completely, use an empty tag `<extra></extra>`.
    ///
    /// default: ``
    pub fn hovertemplate(&mut self, hovertemplate: &'a str) -> &mut Self {
        self.hovertemplate = Some(hovertemplate);
        self
    }
    /// Do the hover effects highlight individual boxes  or sample points or both?
    ///
    /// default: `boxes+points`
    pub fn hoveron(&mut self) -> &mut Hoveron {
        self.hoveron.is_empty = false;
        &mut self.hoveron.data
    }
    /// Sets the calendar system to use with `x` date data.
    ///
    /// default: `gregorian`
    pub fn xcalendar(&mut self, xcalendar: Xcalendar) -> &mut Self {
        self.xcalendar = Some(xcalendar);
        self
    }
    /// Sets the calendar system to use with `y` date data.
    ///
    /// default: `gregorian`
    pub fn ycalendar(&mut self, ycalendar: Ycalendar) -> &mut Self {
        self.ycalendar = Some(ycalendar);
        self
    }
    /// 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.
    ///
    /// default: `x`
    pub fn xaxis(&mut self, xaxis: &'a str) -> &mut Self {
        self.xaxis = Some(xaxis);
        self
    }
    /// 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.
    ///
    /// default: `y`
    pub fn yaxis(&mut self, yaxis: &'a str) -> &mut Self {
        self.yaxis = Some(yaxis);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  ids .
    ///
    pub fn idssrc(&mut self, idssrc: &'a str) -> &mut Self {
        self.idssrc = Some(idssrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  customdata .
    ///
    pub fn customdatasrc(&mut self, customdatasrc: &'a str) -> &mut Self {
        self.customdatasrc = Some(customdatasrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  meta .
    ///
    pub fn metasrc(&mut self, metasrc: &'a str) -> &mut Self {
        self.metasrc = Some(metasrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  hoverinfo .
    ///
    pub fn hoverinfosrc(&mut self, hoverinfosrc: &'a str) -> &mut Self {
        self.hoverinfosrc = Some(hoverinfosrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  y .
    ///
    pub fn ysrc(&mut self, ysrc: &'a str) -> &mut Self {
        self.ysrc = Some(ysrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  x .
    ///
    pub fn xsrc(&mut self, xsrc: &'a str) -> &mut Self {
        self.xsrc = Some(xsrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  q1 .
    ///
    pub fn q_1_src(&mut self, q_1_src: &'a str) -> &mut Self {
        self.q_1_src = Some(q_1_src);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  median .
    ///
    pub fn mediansrc(&mut self, mediansrc: &'a str) -> &mut Self {
        self.mediansrc = Some(mediansrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  q3 .
    ///
    pub fn q_3_src(&mut self, q_3_src: &'a str) -> &mut Self {
        self.q_3_src = Some(q_3_src);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  lowerfence .
    ///
    pub fn lowerfencesrc(&mut self, lowerfencesrc: &'a str) -> &mut Self {
        self.lowerfencesrc = Some(lowerfencesrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  upperfence .
    ///
    pub fn upperfencesrc(&mut self, upperfencesrc: &'a str) -> &mut Self {
        self.upperfencesrc = Some(upperfencesrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  notchspan .
    ///
    pub fn notchspansrc(&mut self, notchspansrc: &'a str) -> &mut Self {
        self.notchspansrc = Some(notchspansrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  mean .
    ///
    pub fn meansrc(&mut self, meansrc: &'a str) -> &mut Self {
        self.meansrc = Some(meansrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  sd .
    ///
    pub fn sdsrc(&mut self, sdsrc: &'a str) -> &mut Self {
        self.sdsrc = Some(sdsrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  text .
    ///
    pub fn textsrc(&mut self, textsrc: &'a str) -> &mut Self {
        self.textsrc = Some(textsrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  hovertext .
    ///
    pub fn hovertextsrc(&mut self, hovertextsrc: &'a str) -> &mut Self {
        self.hovertextsrc = Some(hovertextsrc);
        self
    }
    /// Sets the source reference on Chart Studio Cloud for  hovertemplate .
    ///
    pub fn hovertemplatesrc(&mut self, hovertemplatesrc: &'a str) -> &mut Self {
        self.hovertemplatesrc = Some(hovertemplatesrc);
        self
    }
}
pub enum Visible {
    True,
    False,
    Legendonly,
}
impl serde::Serialize for Visible {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::True => serializer.serialize_bool(true),
            Self::False => serializer.serialize_bool(false),
            Self::Legendonly => serializer.serialize_str("legendonly"),
        }
    }
}
#[derive(Default)]
pub struct HoverinfoFlags ([u8; 1]);
impl HoverinfoFlags {
    pub fn x(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 0; }
        else { self.0[0] &= !(1 << 0); }
        self
    }
    pub fn y(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 1; }
        else { self.0[0] &= !(1 << 1); }
        self
    }
    pub fn z(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 2; }
        else { self.0[0] &= !(1 << 2); }
        self
    }
    pub fn text(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 3; }
        else { self.0[0] &= !(1 << 3); }
        self
    }
    pub fn name(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 4; }
        else { self.0[0] &= !(1 << 4); }
        self
    }
}
impl serde::Serialize for HoverinfoFlags {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        #[allow(unused_mut)]
        let mut v: Vec<&str> = Vec::new();
        if (self.0[0] >> 0) & 0x1 == 1 {
            v.push("x");
        }
        if (self.0[0] >> 1) & 0x1 == 1 {
            v.push("y");
        }
        if (self.0[0] >> 2) & 0x1 == 1 {
            v.push("z");
        }
        if (self.0[0] >> 3) & 0x1 == 1 {
            v.push("text");
        }
        if (self.0[0] >> 4) & 0x1 == 1 {
            v.push("name");
        }
        serializer.serialize_str(&v.join("+"))
    }
}
pub enum Hoverinfo {
    Flags(HoverinfoFlags),
    All,
    None,
    Skip,
}
impl serde::Serialize for Hoverinfo {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::All => serializer.serialize_str("all"),
            Self::None => serializer.serialize_str("none"),
            Self::Skip => serializer.serialize_str("skip"),
            Self::Flags(v) => v.serialize(serializer),
        }
    }
}
impl Default for Hoverinfo {
    fn default() -> Self {
        Self::Flags(HoverinfoFlags::default())
    }
}
impl Hoverinfo {
    pub fn flags(&mut self) -> &mut HoverinfoFlags {
        *self = Self::Flags(HoverinfoFlags::default());
        match self {
            Self::Flags(v) => v,
            _ => unreachable!(),
        }
    }
    pub fn set(&mut self, v: Hoverinfo) {
        *self = v;
    }
}

#[derive(Default, Serialize)]
pub struct Hoverlabel<'a> {
    #[serde(rename = "bgcolor")]
    #[serde(skip_serializing_if = "Option::is_none")]
    bgcolor: Option<&'a str>,
    #[serde(rename = "bordercolor")]
    #[serde(skip_serializing_if = "Option::is_none")]
    bordercolor: Option<&'a str>,
    #[serde(rename = "font")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    font: crate::IsEmpty<hoverlabel::Font<'a>>,
    #[serde(rename = "align")]
    #[serde(skip_serializing_if = "Option::is_none")]
    align: Option<hoverlabel::Align>,
    #[serde(rename = "namelength")]
    #[serde(skip_serializing_if = "Option::is_none")]
    namelength: Option<u64>,
}

impl<'a> Hoverlabel<'a> {
    /// Sets the background color of the hover labels for this trace
    ///
    pub fn bgcolor(&mut self, bgcolor: &'a str) -> &mut Self {
        self.bgcolor = Some(bgcolor);
        self
    }
    /// Sets the border color of the hover labels for this trace.
    ///
    pub fn bordercolor(&mut self, bordercolor: &'a str) -> &mut Self {
        self.bordercolor = Some(bordercolor);
        self
    }
    /// Sets the font used in hover labels.
    ///
    pub fn font(&mut self) -> &mut hoverlabel::Font<'a> {
        self.font.is_empty = false;
        &mut self.font.data
    }
    /// Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines
    ///
    /// default: `auto`
    pub fn align(&mut self, align: hoverlabel::Align) -> &mut Self {
        self.align = Some(align);
        self
    }
    /// Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.
    ///
    /// default: `15`
    pub fn namelength(&mut self, namelength: u64) -> &mut Self {
        self.namelength = Some(namelength);
        self
    }
}
pub mod hoverlabel {
#[allow(unused_imports)]
use serde::Serialize;

/// Sets the font used in hover labels.
#[derive(Default, Serialize)]
pub struct Font<'a> {
    #[serde(rename = "family")]
    #[serde(skip_serializing_if = "Option::is_none")]
    family: Option<&'a str>,
    #[serde(rename = "size")]
    #[serde(skip_serializing_if = "Option::is_none")]
    size: Option<f64>,
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
}

impl<'a> Font<'a> {
    /// HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.
    ///
    pub fn family(&mut self, family: &'a str) -> &mut Self {
        self.family = Some(family);
        self
    }
    pub fn size(&mut self, size: f64) -> &mut Self {
        self.size = Some(size);
        self
    }
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
}
pub enum Align {
    Left,
    Right,
    Auto,
}
impl serde::Serialize for Align {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Left => serializer.serialize_str("left"),
            Self::Right => serializer.serialize_str("right"),
            Self::Auto => serializer.serialize_str("auto"),
        }
    }
}
}

#[derive(Default, Serialize)]
pub struct Stream<'a> {
    #[serde(rename = "token")]
    #[serde(skip_serializing_if = "Option::is_none")]
    token: Option<&'a str>,
    #[serde(rename = "maxpoints")]
    #[serde(skip_serializing_if = "Option::is_none")]
    maxpoints: Option<f64>,
}

impl<'a> Stream<'a> {
    /// The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details.
    ///
    pub fn token(&mut self, token: &'a str) -> &mut Self {
        self.token = Some(token);
        self
    }
    /// Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.
    ///
    /// default: `500`
    pub fn maxpoints(&mut self, maxpoints: f64) -> &mut Self {
        self.maxpoints = Some(maxpoints);
        self
    }
}
pub enum Boxpoints {
    All,
    Outliers,
    Suspectedoutliers,
    False,
}
impl serde::Serialize for Boxpoints {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::All => serializer.serialize_str("all"),
            Self::Outliers => serializer.serialize_str("outliers"),
            Self::Suspectedoutliers => serializer.serialize_str("suspectedoutliers"),
            Self::False => serializer.serialize_bool(false),
        }
    }
}
pub enum Boxmean {
    True,
    Sd,
    False,
}
impl serde::Serialize for Boxmean {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::True => serializer.serialize_bool(true),
            Self::Sd => serializer.serialize_str("sd"),
            Self::False => serializer.serialize_bool(false),
        }
    }
}
pub enum Orientation {
    V,
    H,
}
impl serde::Serialize for Orientation {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::V => serializer.serialize_str("v"),
            Self::H => serializer.serialize_str("h"),
        }
    }
}
pub enum Quartilemethod {
    Linear,
    Exclusive,
    Inclusive,
}
impl serde::Serialize for Quartilemethod {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Linear => serializer.serialize_str("linear"),
            Self::Exclusive => serializer.serialize_str("exclusive"),
            Self::Inclusive => serializer.serialize_str("inclusive"),
        }
    }
}

#[derive(Default, Serialize)]
pub struct Marker<'a> {
    #[serde(rename = "outliercolor")]
    #[serde(skip_serializing_if = "Option::is_none")]
    outliercolor: Option<&'a str>,
    #[serde(rename = "symbol")]
    #[serde(skip_serializing_if = "Option::is_none")]
    symbol: Option<marker::Symbol>,
    #[serde(rename = "opacity")]
    #[serde(skip_serializing_if = "Option::is_none")]
    opacity: Option<f64>,
    #[serde(rename = "size")]
    #[serde(skip_serializing_if = "Option::is_none")]
    size: Option<f64>,
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
    #[serde(rename = "line")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    line: crate::IsEmpty<marker::Line<'a>>,
}

impl<'a> Marker<'a> {
    /// Sets the color of the outlier sample points.
    ///
    /// default: `rgba(0, 0, 0, 0)`
    pub fn outliercolor(&mut self, outliercolor: &'a str) -> &mut Self {
        self.outliercolor = Some(outliercolor);
        self
    }
    /// Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.
    ///
    /// default: `circle`
    pub fn symbol(&mut self, symbol: marker::Symbol) -> &mut Self {
        self.symbol = Some(symbol);
        self
    }
    /// Sets the marker opacity.
    ///
    /// default: `1`
    pub fn opacity(&mut self, opacity: f64) -> &mut Self {
        self.opacity = Some(opacity);
        self
    }
    /// Sets the marker size (in px).
    ///
    /// default: `6`
    pub fn size(&mut self, size: f64) -> &mut Self {
        self.size = Some(size);
        self
    }
    /// Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.
    ///
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
    pub fn line(&mut self) -> &mut marker::Line<'a> {
        self.line.is_empty = false;
        &mut self.line.data
    }
}
pub mod marker {
#[allow(unused_imports)]
use serde::Serialize;
pub enum Symbol {
    Num0,
    Circle,
    Num100,
    CircleOpen,
    Num200,
    CircleDot,
    Num300,
    CircleOpenDot,
    Num1,
    Square,
    Num101,
    SquareOpen,
    Num201,
    SquareDot,
    Num301,
    SquareOpenDot,
    Num2,
    Diamond,
    Num102,
    DiamondOpen,
    Num202,
    DiamondDot,
    Num302,
    DiamondOpenDot,
    Num3,
    Cross,
    Num103,
    CrossOpen,
    Num203,
    CrossDot,
    Num303,
    CrossOpenDot,
    Num4,
    X,
    Num104,
    XOpen,
    Num204,
    XDot,
    Num304,
    XOpenDot,
    Num5,
    TriangleUp,
    Num105,
    TriangleUpOpen,
    Num205,
    TriangleUpDot,
    Num305,
    TriangleUpOpenDot,
    Num6,
    TriangleDown,
    Num106,
    TriangleDownOpen,
    Num206,
    TriangleDownDot,
    Num306,
    TriangleDownOpenDot,
    Num7,
    TriangleLeft,
    Num107,
    TriangleLeftOpen,
    Num207,
    TriangleLeftDot,
    Num307,
    TriangleLeftOpenDot,
    Num8,
    TriangleRight,
    Num108,
    TriangleRightOpen,
    Num208,
    TriangleRightDot,
    Num308,
    TriangleRightOpenDot,
    Num9,
    TriangleNe,
    Num109,
    TriangleNeOpen,
    Num209,
    TriangleNeDot,
    Num309,
    TriangleNeOpenDot,
    Num10,
    TriangleSe,
    Num110,
    TriangleSeOpen,
    Num210,
    TriangleSeDot,
    Num310,
    TriangleSeOpenDot,
    Num11,
    TriangleSw,
    Num111,
    TriangleSwOpen,
    Num211,
    TriangleSwDot,
    Num311,
    TriangleSwOpenDot,
    Num12,
    TriangleNw,
    Num112,
    TriangleNwOpen,
    Num212,
    TriangleNwDot,
    Num312,
    TriangleNwOpenDot,
    Num13,
    Pentagon,
    Num113,
    PentagonOpen,
    Num213,
    PentagonDot,
    Num313,
    PentagonOpenDot,
    Num14,
    Hexagon,
    Num114,
    HexagonOpen,
    Num214,
    HexagonDot,
    Num314,
    HexagonOpenDot,
    Num15,
    Hexagon2,
    Num115,
    Hexagon2Open,
    Num215,
    Hexagon2Dot,
    Num315,
    Hexagon2OpenDot,
    Num16,
    Octagon,
    Num116,
    OctagonOpen,
    Num216,
    OctagonDot,
    Num316,
    OctagonOpenDot,
    Num17,
    Star,
    Num117,
    StarOpen,
    Num217,
    StarDot,
    Num317,
    StarOpenDot,
    Num18,
    Hexagram,
    Num118,
    HexagramOpen,
    Num218,
    HexagramDot,
    Num318,
    HexagramOpenDot,
    Num19,
    StarTriangleUp,
    Num119,
    StarTriangleUpOpen,
    Num219,
    StarTriangleUpDot,
    Num319,
    StarTriangleUpOpenDot,
    Num20,
    StarTriangleDown,
    Num120,
    StarTriangleDownOpen,
    Num220,
    StarTriangleDownDot,
    Num320,
    StarTriangleDownOpenDot,
    Num21,
    StarSquare,
    Num121,
    StarSquareOpen,
    Num221,
    StarSquareDot,
    Num321,
    StarSquareOpenDot,
    Num22,
    StarDiamond,
    Num122,
    StarDiamondOpen,
    Num222,
    StarDiamondDot,
    Num322,
    StarDiamondOpenDot,
    Num23,
    DiamondTall,
    Num123,
    DiamondTallOpen,
    Num223,
    DiamondTallDot,
    Num323,
    DiamondTallOpenDot,
    Num24,
    DiamondWide,
    Num124,
    DiamondWideOpen,
    Num224,
    DiamondWideDot,
    Num324,
    DiamondWideOpenDot,
    Num25,
    Hourglass,
    Num125,
    HourglassOpen,
    Num26,
    Bowtie,
    Num126,
    BowtieOpen,
    Num27,
    CircleCross,
    Num127,
    CircleCrossOpen,
    Num28,
    CircleX,
    Num128,
    CircleXOpen,
    Num29,
    SquareCross,
    Num129,
    SquareCrossOpen,
    Num30,
    SquareX,
    Num130,
    SquareXOpen,
    Num31,
    DiamondCross,
    Num131,
    DiamondCrossOpen,
    Num32,
    DiamondX,
    Num132,
    DiamondXOpen,
    Num33,
    CrossThin,
    Num133,
    CrossThinOpen,
    Num34,
    XThin,
    Num134,
    XThinOpen,
    Num35,
    Asterisk,
    Num135,
    AsteriskOpen,
    Num36,
    Hash,
    Num136,
    HashOpen,
    Num236,
    HashDot,
    Num336,
    HashOpenDot,
    Num37,
    YUp,
    Num137,
    YUpOpen,
    Num38,
    YDown,
    Num138,
    YDownOpen,
    Num39,
    YLeft,
    Num139,
    YLeftOpen,
    Num40,
    YRight,
    Num140,
    YRightOpen,
    Num41,
    LineEw,
    Num141,
    LineEwOpen,
    Num42,
    LineNs,
    Num142,
    LineNsOpen,
    Num43,
    LineNe,
    Num143,
    LineNeOpen,
    Num44,
    LineNw,
    Num144,
    LineNwOpen,
}
impl serde::Serialize for Symbol {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Num0 => serializer.serialize_u64(0),
            Self::Circle => serializer.serialize_str("circle"),
            Self::Num100 => serializer.serialize_u64(100),
            Self::CircleOpen => serializer.serialize_str("circle-open"),
            Self::Num200 => serializer.serialize_u64(200),
            Self::CircleDot => serializer.serialize_str("circle-dot"),
            Self::Num300 => serializer.serialize_u64(300),
            Self::CircleOpenDot => serializer.serialize_str("circle-open-dot"),
            Self::Num1 => serializer.serialize_u64(1),
            Self::Square => serializer.serialize_str("square"),
            Self::Num101 => serializer.serialize_u64(101),
            Self::SquareOpen => serializer.serialize_str("square-open"),
            Self::Num201 => serializer.serialize_u64(201),
            Self::SquareDot => serializer.serialize_str("square-dot"),
            Self::Num301 => serializer.serialize_u64(301),
            Self::SquareOpenDot => serializer.serialize_str("square-open-dot"),
            Self::Num2 => serializer.serialize_u64(2),
            Self::Diamond => serializer.serialize_str("diamond"),
            Self::Num102 => serializer.serialize_u64(102),
            Self::DiamondOpen => serializer.serialize_str("diamond-open"),
            Self::Num202 => serializer.serialize_u64(202),
            Self::DiamondDot => serializer.serialize_str("diamond-dot"),
            Self::Num302 => serializer.serialize_u64(302),
            Self::DiamondOpenDot => serializer.serialize_str("diamond-open-dot"),
            Self::Num3 => serializer.serialize_u64(3),
            Self::Cross => serializer.serialize_str("cross"),
            Self::Num103 => serializer.serialize_u64(103),
            Self::CrossOpen => serializer.serialize_str("cross-open"),
            Self::Num203 => serializer.serialize_u64(203),
            Self::CrossDot => serializer.serialize_str("cross-dot"),
            Self::Num303 => serializer.serialize_u64(303),
            Self::CrossOpenDot => serializer.serialize_str("cross-open-dot"),
            Self::Num4 => serializer.serialize_u64(4),
            Self::X => serializer.serialize_str("x"),
            Self::Num104 => serializer.serialize_u64(104),
            Self::XOpen => serializer.serialize_str("x-open"),
            Self::Num204 => serializer.serialize_u64(204),
            Self::XDot => serializer.serialize_str("x-dot"),
            Self::Num304 => serializer.serialize_u64(304),
            Self::XOpenDot => serializer.serialize_str("x-open-dot"),
            Self::Num5 => serializer.serialize_u64(5),
            Self::TriangleUp => serializer.serialize_str("triangle-up"),
            Self::Num105 => serializer.serialize_u64(105),
            Self::TriangleUpOpen => serializer.serialize_str("triangle-up-open"),
            Self::Num205 => serializer.serialize_u64(205),
            Self::TriangleUpDot => serializer.serialize_str("triangle-up-dot"),
            Self::Num305 => serializer.serialize_u64(305),
            Self::TriangleUpOpenDot => serializer.serialize_str("triangle-up-open-dot"),
            Self::Num6 => serializer.serialize_u64(6),
            Self::TriangleDown => serializer.serialize_str("triangle-down"),
            Self::Num106 => serializer.serialize_u64(106),
            Self::TriangleDownOpen => serializer.serialize_str("triangle-down-open"),
            Self::Num206 => serializer.serialize_u64(206),
            Self::TriangleDownDot => serializer.serialize_str("triangle-down-dot"),
            Self::Num306 => serializer.serialize_u64(306),
            Self::TriangleDownOpenDot => serializer.serialize_str("triangle-down-open-dot"),
            Self::Num7 => serializer.serialize_u64(7),
            Self::TriangleLeft => serializer.serialize_str("triangle-left"),
            Self::Num107 => serializer.serialize_u64(107),
            Self::TriangleLeftOpen => serializer.serialize_str("triangle-left-open"),
            Self::Num207 => serializer.serialize_u64(207),
            Self::TriangleLeftDot => serializer.serialize_str("triangle-left-dot"),
            Self::Num307 => serializer.serialize_u64(307),
            Self::TriangleLeftOpenDot => serializer.serialize_str("triangle-left-open-dot"),
            Self::Num8 => serializer.serialize_u64(8),
            Self::TriangleRight => serializer.serialize_str("triangle-right"),
            Self::Num108 => serializer.serialize_u64(108),
            Self::TriangleRightOpen => serializer.serialize_str("triangle-right-open"),
            Self::Num208 => serializer.serialize_u64(208),
            Self::TriangleRightDot => serializer.serialize_str("triangle-right-dot"),
            Self::Num308 => serializer.serialize_u64(308),
            Self::TriangleRightOpenDot => serializer.serialize_str("triangle-right-open-dot"),
            Self::Num9 => serializer.serialize_u64(9),
            Self::TriangleNe => serializer.serialize_str("triangle-ne"),
            Self::Num109 => serializer.serialize_u64(109),
            Self::TriangleNeOpen => serializer.serialize_str("triangle-ne-open"),
            Self::Num209 => serializer.serialize_u64(209),
            Self::TriangleNeDot => serializer.serialize_str("triangle-ne-dot"),
            Self::Num309 => serializer.serialize_u64(309),
            Self::TriangleNeOpenDot => serializer.serialize_str("triangle-ne-open-dot"),
            Self::Num10 => serializer.serialize_u64(10),
            Self::TriangleSe => serializer.serialize_str("triangle-se"),
            Self::Num110 => serializer.serialize_u64(110),
            Self::TriangleSeOpen => serializer.serialize_str("triangle-se-open"),
            Self::Num210 => serializer.serialize_u64(210),
            Self::TriangleSeDot => serializer.serialize_str("triangle-se-dot"),
            Self::Num310 => serializer.serialize_u64(310),
            Self::TriangleSeOpenDot => serializer.serialize_str("triangle-se-open-dot"),
            Self::Num11 => serializer.serialize_u64(11),
            Self::TriangleSw => serializer.serialize_str("triangle-sw"),
            Self::Num111 => serializer.serialize_u64(111),
            Self::TriangleSwOpen => serializer.serialize_str("triangle-sw-open"),
            Self::Num211 => serializer.serialize_u64(211),
            Self::TriangleSwDot => serializer.serialize_str("triangle-sw-dot"),
            Self::Num311 => serializer.serialize_u64(311),
            Self::TriangleSwOpenDot => serializer.serialize_str("triangle-sw-open-dot"),
            Self::Num12 => serializer.serialize_u64(12),
            Self::TriangleNw => serializer.serialize_str("triangle-nw"),
            Self::Num112 => serializer.serialize_u64(112),
            Self::TriangleNwOpen => serializer.serialize_str("triangle-nw-open"),
            Self::Num212 => serializer.serialize_u64(212),
            Self::TriangleNwDot => serializer.serialize_str("triangle-nw-dot"),
            Self::Num312 => serializer.serialize_u64(312),
            Self::TriangleNwOpenDot => serializer.serialize_str("triangle-nw-open-dot"),
            Self::Num13 => serializer.serialize_u64(13),
            Self::Pentagon => serializer.serialize_str("pentagon"),
            Self::Num113 => serializer.serialize_u64(113),
            Self::PentagonOpen => serializer.serialize_str("pentagon-open"),
            Self::Num213 => serializer.serialize_u64(213),
            Self::PentagonDot => serializer.serialize_str("pentagon-dot"),
            Self::Num313 => serializer.serialize_u64(313),
            Self::PentagonOpenDot => serializer.serialize_str("pentagon-open-dot"),
            Self::Num14 => serializer.serialize_u64(14),
            Self::Hexagon => serializer.serialize_str("hexagon"),
            Self::Num114 => serializer.serialize_u64(114),
            Self::HexagonOpen => serializer.serialize_str("hexagon-open"),
            Self::Num214 => serializer.serialize_u64(214),
            Self::HexagonDot => serializer.serialize_str("hexagon-dot"),
            Self::Num314 => serializer.serialize_u64(314),
            Self::HexagonOpenDot => serializer.serialize_str("hexagon-open-dot"),
            Self::Num15 => serializer.serialize_u64(15),
            Self::Hexagon2 => serializer.serialize_str("hexagon2"),
            Self::Num115 => serializer.serialize_u64(115),
            Self::Hexagon2Open => serializer.serialize_str("hexagon2-open"),
            Self::Num215 => serializer.serialize_u64(215),
            Self::Hexagon2Dot => serializer.serialize_str("hexagon2-dot"),
            Self::Num315 => serializer.serialize_u64(315),
            Self::Hexagon2OpenDot => serializer.serialize_str("hexagon2-open-dot"),
            Self::Num16 => serializer.serialize_u64(16),
            Self::Octagon => serializer.serialize_str("octagon"),
            Self::Num116 => serializer.serialize_u64(116),
            Self::OctagonOpen => serializer.serialize_str("octagon-open"),
            Self::Num216 => serializer.serialize_u64(216),
            Self::OctagonDot => serializer.serialize_str("octagon-dot"),
            Self::Num316 => serializer.serialize_u64(316),
            Self::OctagonOpenDot => serializer.serialize_str("octagon-open-dot"),
            Self::Num17 => serializer.serialize_u64(17),
            Self::Star => serializer.serialize_str("star"),
            Self::Num117 => serializer.serialize_u64(117),
            Self::StarOpen => serializer.serialize_str("star-open"),
            Self::Num217 => serializer.serialize_u64(217),
            Self::StarDot => serializer.serialize_str("star-dot"),
            Self::Num317 => serializer.serialize_u64(317),
            Self::StarOpenDot => serializer.serialize_str("star-open-dot"),
            Self::Num18 => serializer.serialize_u64(18),
            Self::Hexagram => serializer.serialize_str("hexagram"),
            Self::Num118 => serializer.serialize_u64(118),
            Self::HexagramOpen => serializer.serialize_str("hexagram-open"),
            Self::Num218 => serializer.serialize_u64(218),
            Self::HexagramDot => serializer.serialize_str("hexagram-dot"),
            Self::Num318 => serializer.serialize_u64(318),
            Self::HexagramOpenDot => serializer.serialize_str("hexagram-open-dot"),
            Self::Num19 => serializer.serialize_u64(19),
            Self::StarTriangleUp => serializer.serialize_str("star-triangle-up"),
            Self::Num119 => serializer.serialize_u64(119),
            Self::StarTriangleUpOpen => serializer.serialize_str("star-triangle-up-open"),
            Self::Num219 => serializer.serialize_u64(219),
            Self::StarTriangleUpDot => serializer.serialize_str("star-triangle-up-dot"),
            Self::Num319 => serializer.serialize_u64(319),
            Self::StarTriangleUpOpenDot => serializer.serialize_str("star-triangle-up-open-dot"),
            Self::Num20 => serializer.serialize_u64(20),
            Self::StarTriangleDown => serializer.serialize_str("star-triangle-down"),
            Self::Num120 => serializer.serialize_u64(120),
            Self::StarTriangleDownOpen => serializer.serialize_str("star-triangle-down-open"),
            Self::Num220 => serializer.serialize_u64(220),
            Self::StarTriangleDownDot => serializer.serialize_str("star-triangle-down-dot"),
            Self::Num320 => serializer.serialize_u64(320),
            Self::StarTriangleDownOpenDot => serializer.serialize_str("star-triangle-down-open-dot"),
            Self::Num21 => serializer.serialize_u64(21),
            Self::StarSquare => serializer.serialize_str("star-square"),
            Self::Num121 => serializer.serialize_u64(121),
            Self::StarSquareOpen => serializer.serialize_str("star-square-open"),
            Self::Num221 => serializer.serialize_u64(221),
            Self::StarSquareDot => serializer.serialize_str("star-square-dot"),
            Self::Num321 => serializer.serialize_u64(321),
            Self::StarSquareOpenDot => serializer.serialize_str("star-square-open-dot"),
            Self::Num22 => serializer.serialize_u64(22),
            Self::StarDiamond => serializer.serialize_str("star-diamond"),
            Self::Num122 => serializer.serialize_u64(122),
            Self::StarDiamondOpen => serializer.serialize_str("star-diamond-open"),
            Self::Num222 => serializer.serialize_u64(222),
            Self::StarDiamondDot => serializer.serialize_str("star-diamond-dot"),
            Self::Num322 => serializer.serialize_u64(322),
            Self::StarDiamondOpenDot => serializer.serialize_str("star-diamond-open-dot"),
            Self::Num23 => serializer.serialize_u64(23),
            Self::DiamondTall => serializer.serialize_str("diamond-tall"),
            Self::Num123 => serializer.serialize_u64(123),
            Self::DiamondTallOpen => serializer.serialize_str("diamond-tall-open"),
            Self::Num223 => serializer.serialize_u64(223),
            Self::DiamondTallDot => serializer.serialize_str("diamond-tall-dot"),
            Self::Num323 => serializer.serialize_u64(323),
            Self::DiamondTallOpenDot => serializer.serialize_str("diamond-tall-open-dot"),
            Self::Num24 => serializer.serialize_u64(24),
            Self::DiamondWide => serializer.serialize_str("diamond-wide"),
            Self::Num124 => serializer.serialize_u64(124),
            Self::DiamondWideOpen => serializer.serialize_str("diamond-wide-open"),
            Self::Num224 => serializer.serialize_u64(224),
            Self::DiamondWideDot => serializer.serialize_str("diamond-wide-dot"),
            Self::Num324 => serializer.serialize_u64(324),
            Self::DiamondWideOpenDot => serializer.serialize_str("diamond-wide-open-dot"),
            Self::Num25 => serializer.serialize_u64(25),
            Self::Hourglass => serializer.serialize_str("hourglass"),
            Self::Num125 => serializer.serialize_u64(125),
            Self::HourglassOpen => serializer.serialize_str("hourglass-open"),
            Self::Num26 => serializer.serialize_u64(26),
            Self::Bowtie => serializer.serialize_str("bowtie"),
            Self::Num126 => serializer.serialize_u64(126),
            Self::BowtieOpen => serializer.serialize_str("bowtie-open"),
            Self::Num27 => serializer.serialize_u64(27),
            Self::CircleCross => serializer.serialize_str("circle-cross"),
            Self::Num127 => serializer.serialize_u64(127),
            Self::CircleCrossOpen => serializer.serialize_str("circle-cross-open"),
            Self::Num28 => serializer.serialize_u64(28),
            Self::CircleX => serializer.serialize_str("circle-x"),
            Self::Num128 => serializer.serialize_u64(128),
            Self::CircleXOpen => serializer.serialize_str("circle-x-open"),
            Self::Num29 => serializer.serialize_u64(29),
            Self::SquareCross => serializer.serialize_str("square-cross"),
            Self::Num129 => serializer.serialize_u64(129),
            Self::SquareCrossOpen => serializer.serialize_str("square-cross-open"),
            Self::Num30 => serializer.serialize_u64(30),
            Self::SquareX => serializer.serialize_str("square-x"),
            Self::Num130 => serializer.serialize_u64(130),
            Self::SquareXOpen => serializer.serialize_str("square-x-open"),
            Self::Num31 => serializer.serialize_u64(31),
            Self::DiamondCross => serializer.serialize_str("diamond-cross"),
            Self::Num131 => serializer.serialize_u64(131),
            Self::DiamondCrossOpen => serializer.serialize_str("diamond-cross-open"),
            Self::Num32 => serializer.serialize_u64(32),
            Self::DiamondX => serializer.serialize_str("diamond-x"),
            Self::Num132 => serializer.serialize_u64(132),
            Self::DiamondXOpen => serializer.serialize_str("diamond-x-open"),
            Self::Num33 => serializer.serialize_u64(33),
            Self::CrossThin => serializer.serialize_str("cross-thin"),
            Self::Num133 => serializer.serialize_u64(133),
            Self::CrossThinOpen => serializer.serialize_str("cross-thin-open"),
            Self::Num34 => serializer.serialize_u64(34),
            Self::XThin => serializer.serialize_str("x-thin"),
            Self::Num134 => serializer.serialize_u64(134),
            Self::XThinOpen => serializer.serialize_str("x-thin-open"),
            Self::Num35 => serializer.serialize_u64(35),
            Self::Asterisk => serializer.serialize_str("asterisk"),
            Self::Num135 => serializer.serialize_u64(135),
            Self::AsteriskOpen => serializer.serialize_str("asterisk-open"),
            Self::Num36 => serializer.serialize_u64(36),
            Self::Hash => serializer.serialize_str("hash"),
            Self::Num136 => serializer.serialize_u64(136),
            Self::HashOpen => serializer.serialize_str("hash-open"),
            Self::Num236 => serializer.serialize_u64(236),
            Self::HashDot => serializer.serialize_str("hash-dot"),
            Self::Num336 => serializer.serialize_u64(336),
            Self::HashOpenDot => serializer.serialize_str("hash-open-dot"),
            Self::Num37 => serializer.serialize_u64(37),
            Self::YUp => serializer.serialize_str("y-up"),
            Self::Num137 => serializer.serialize_u64(137),
            Self::YUpOpen => serializer.serialize_str("y-up-open"),
            Self::Num38 => serializer.serialize_u64(38),
            Self::YDown => serializer.serialize_str("y-down"),
            Self::Num138 => serializer.serialize_u64(138),
            Self::YDownOpen => serializer.serialize_str("y-down-open"),
            Self::Num39 => serializer.serialize_u64(39),
            Self::YLeft => serializer.serialize_str("y-left"),
            Self::Num139 => serializer.serialize_u64(139),
            Self::YLeftOpen => serializer.serialize_str("y-left-open"),
            Self::Num40 => serializer.serialize_u64(40),
            Self::YRight => serializer.serialize_str("y-right"),
            Self::Num140 => serializer.serialize_u64(140),
            Self::YRightOpen => serializer.serialize_str("y-right-open"),
            Self::Num41 => serializer.serialize_u64(41),
            Self::LineEw => serializer.serialize_str("line-ew"),
            Self::Num141 => serializer.serialize_u64(141),
            Self::LineEwOpen => serializer.serialize_str("line-ew-open"),
            Self::Num42 => serializer.serialize_u64(42),
            Self::LineNs => serializer.serialize_str("line-ns"),
            Self::Num142 => serializer.serialize_u64(142),
            Self::LineNsOpen => serializer.serialize_str("line-ns-open"),
            Self::Num43 => serializer.serialize_u64(43),
            Self::LineNe => serializer.serialize_str("line-ne"),
            Self::Num143 => serializer.serialize_u64(143),
            Self::LineNeOpen => serializer.serialize_str("line-ne-open"),
            Self::Num44 => serializer.serialize_u64(44),
            Self::LineNw => serializer.serialize_str("line-nw"),
            Self::Num144 => serializer.serialize_u64(144),
            Self::LineNwOpen => serializer.serialize_str("line-nw-open"),
        }
    }
}

#[derive(Default, Serialize)]
pub struct Line<'a> {
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
    #[serde(rename = "width")]
    #[serde(skip_serializing_if = "Option::is_none")]
    width: Option<f64>,
    #[serde(rename = "outliercolor")]
    #[serde(skip_serializing_if = "Option::is_none")]
    outliercolor: Option<&'a str>,
    #[serde(rename = "outlierwidth")]
    #[serde(skip_serializing_if = "Option::is_none")]
    outlierwidth: Option<f64>,
}

impl<'a> Line<'a> {
    /// Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set.
    ///
    /// default: `#444`
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
    /// Sets the width (in px) of the lines bounding the marker points.
    ///
    /// default: `0`
    pub fn width(&mut self, width: f64) -> &mut Self {
        self.width = Some(width);
        self
    }
    /// Sets the border line color of the outlier sample points. Defaults to marker.color
    ///
    pub fn outliercolor(&mut self, outliercolor: &'a str) -> &mut Self {
        self.outliercolor = Some(outliercolor);
        self
    }
    /// Sets the border line width (in px) of the outlier sample points.
    ///
    /// default: `1`
    pub fn outlierwidth(&mut self, outlierwidth: f64) -> &mut Self {
        self.outlierwidth = Some(outlierwidth);
        self
    }
}
}

#[derive(Default, Serialize)]
pub struct Line<'a> {
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
    #[serde(rename = "width")]
    #[serde(skip_serializing_if = "Option::is_none")]
    width: Option<f64>,
}

impl<'a> Line<'a> {
    /// Sets the color of line bounding the box(es).
    ///
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
    /// Sets the width (in px) of line bounding the box(es).
    ///
    /// default: `2`
    pub fn width(&mut self, width: f64) -> &mut Self {
        self.width = Some(width);
        self
    }
}

#[derive(Default, Serialize)]
pub struct Selected<'a> {
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    marker: crate::IsEmpty<selected::Marker<'a>>,
}

impl<'a> Selected<'a> {
    pub fn marker(&mut self) -> &mut selected::Marker<'a> {
        self.marker.is_empty = false;
        &mut self.marker.data
    }
}
pub mod selected {
#[allow(unused_imports)]
use serde::Serialize;

#[derive(Default, Serialize)]
pub struct Marker<'a> {
    #[serde(rename = "opacity")]
    #[serde(skip_serializing_if = "Option::is_none")]
    opacity: Option<f64>,
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
    #[serde(rename = "size")]
    #[serde(skip_serializing_if = "Option::is_none")]
    size: Option<f64>,
}

impl<'a> Marker<'a> {
    /// Sets the marker opacity of selected points.
    ///
    pub fn opacity(&mut self, opacity: f64) -> &mut Self {
        self.opacity = Some(opacity);
        self
    }
    /// Sets the marker color of selected points.
    ///
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
    /// Sets the marker size of selected points.
    ///
    pub fn size(&mut self, size: f64) -> &mut Self {
        self.size = Some(size);
        self
    }
}
}

#[derive(Default, Serialize)]
pub struct Unselected<'a> {
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "crate::IsEmpty::is_empty")]
    marker: crate::IsEmpty<unselected::Marker<'a>>,
}

impl<'a> Unselected<'a> {
    pub fn marker(&mut self) -> &mut unselected::Marker<'a> {
        self.marker.is_empty = false;
        &mut self.marker.data
    }
}
pub mod unselected {
#[allow(unused_imports)]
use serde::Serialize;

#[derive(Default, Serialize)]
pub struct Marker<'a> {
    #[serde(rename = "opacity")]
    #[serde(skip_serializing_if = "Option::is_none")]
    opacity: Option<f64>,
    #[serde(rename = "color")]
    #[serde(skip_serializing_if = "Option::is_none")]
    color: Option<&'a str>,
    #[serde(rename = "size")]
    #[serde(skip_serializing_if = "Option::is_none")]
    size: Option<f64>,
}

impl<'a> Marker<'a> {
    /// Sets the marker opacity of unselected points, applied only when a selection exists.
    ///
    pub fn opacity(&mut self, opacity: f64) -> &mut Self {
        self.opacity = Some(opacity);
        self
    }
    /// Sets the marker color of unselected points, applied only when a selection exists.
    ///
    pub fn color(&mut self, color: &'a str) -> &mut Self {
        self.color = Some(color);
        self
    }
    /// Sets the marker size of unselected points, applied only when a selection exists.
    ///
    pub fn size(&mut self, size: f64) -> &mut Self {
        self.size = Some(size);
        self
    }
}
}
#[derive(Default)]
pub struct HoveronFlags ([u8; 1]);
impl HoveronFlags {
    pub fn boxes(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 0; }
        else { self.0[0] &= !(1 << 0); }
        self
    }
    pub fn points(&mut self, v: bool) -> &mut Self {
        if v { self.0[0] |= 1 << 1; }
        else { self.0[0] &= !(1 << 1); }
        self
    }
}
impl serde::Serialize for HoveronFlags {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        #[allow(unused_mut)]
        let mut v: Vec<&str> = Vec::new();
        if (self.0[0] >> 0) & 0x1 == 1 {
            v.push("boxes");
        }
        if (self.0[0] >> 1) & 0x1 == 1 {
            v.push("points");
        }
        serializer.serialize_str(&v.join("+"))
    }
}
pub enum Hoveron {
    Flags(HoveronFlags),
}
impl serde::Serialize for Hoveron {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Flags(v) => v.serialize(serializer),
        }
    }
}
impl Default for Hoveron {
    fn default() -> Self {
        Self::Flags(HoveronFlags::default())
    }
}
impl Hoveron {
    pub fn flags(&mut self) -> &mut HoveronFlags {
        *self = Self::Flags(HoveronFlags::default());
        match self {
            Self::Flags(v) => v,
        }
    }
    pub fn set(&mut self, v: Hoveron) {
        *self = v;
    }
}
pub enum Xcalendar {
    Gregorian,
    Chinese,
    Coptic,
    Discworld,
    Ethiopian,
    Hebrew,
    Islamic,
    Julian,
    Mayan,
    Nanakshahi,
    Nepali,
    Persian,
    Jalali,
    Taiwan,
    Thai,
    Ummalqura,
}
impl serde::Serialize for Xcalendar {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Gregorian => serializer.serialize_str("gregorian"),
            Self::Chinese => serializer.serialize_str("chinese"),
            Self::Coptic => serializer.serialize_str("coptic"),
            Self::Discworld => serializer.serialize_str("discworld"),
            Self::Ethiopian => serializer.serialize_str("ethiopian"),
            Self::Hebrew => serializer.serialize_str("hebrew"),
            Self::Islamic => serializer.serialize_str("islamic"),
            Self::Julian => serializer.serialize_str("julian"),
            Self::Mayan => serializer.serialize_str("mayan"),
            Self::Nanakshahi => serializer.serialize_str("nanakshahi"),
            Self::Nepali => serializer.serialize_str("nepali"),
            Self::Persian => serializer.serialize_str("persian"),
            Self::Jalali => serializer.serialize_str("jalali"),
            Self::Taiwan => serializer.serialize_str("taiwan"),
            Self::Thai => serializer.serialize_str("thai"),
            Self::Ummalqura => serializer.serialize_str("ummalqura"),
        }
    }
}
pub enum Ycalendar {
    Gregorian,
    Chinese,
    Coptic,
    Discworld,
    Ethiopian,
    Hebrew,
    Islamic,
    Julian,
    Mayan,
    Nanakshahi,
    Nepali,
    Persian,
    Jalali,
    Taiwan,
    Thai,
    Ummalqura,
}
impl serde::Serialize for Ycalendar {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        match self {
            Self::Gregorian => serializer.serialize_str("gregorian"),
            Self::Chinese => serializer.serialize_str("chinese"),
            Self::Coptic => serializer.serialize_str("coptic"),
            Self::Discworld => serializer.serialize_str("discworld"),
            Self::Ethiopian => serializer.serialize_str("ethiopian"),
            Self::Hebrew => serializer.serialize_str("hebrew"),
            Self::Islamic => serializer.serialize_str("islamic"),
            Self::Julian => serializer.serialize_str("julian"),
            Self::Mayan => serializer.serialize_str("mayan"),
            Self::Nanakshahi => serializer.serialize_str("nanakshahi"),
            Self::Nepali => serializer.serialize_str("nepali"),
            Self::Persian => serializer.serialize_str("persian"),
            Self::Jalali => serializer.serialize_str("jalali"),
            Self::Taiwan => serializer.serialize_str("taiwan"),
            Self::Thai => serializer.serialize_str("thai"),
            Self::Ummalqura => serializer.serialize_str("ummalqura"),
        }
    }
}