@@ -53,10 +53,10 @@ pub enum HoverInfo {
53
53
Skip ,
54
54
}
55
55
56
+ #[ serde_with:: skip_serializing_none]
56
57
#[ derive( Serialize , Clone , Debug , Default ) ]
57
58
pub struct LegendGroupTitle {
58
59
text : String ,
59
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
60
60
font : Option < Font > ,
61
61
}
62
62
@@ -74,15 +74,12 @@ impl LegendGroupTitle {
74
74
}
75
75
}
76
76
77
+ #[ serde_with:: skip_serializing_none]
77
78
#[ derive( Serialize , Clone , Debug , Default ) ]
78
79
pub struct Domain {
79
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
80
80
column : Option < usize > ,
81
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
82
81
row : Option < usize > ,
83
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
84
82
x : Option < [ f64 ; 2 ] > ,
85
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
86
83
y : Option < [ f64 ; 2 ] > ,
87
84
}
88
85
@@ -490,37 +487,28 @@ pub enum LineShape {
490
487
Vhv ,
491
488
}
492
489
490
+ #[ serde_with:: skip_serializing_none]
493
491
#[ derive( Serialize , Clone , Debug , Default ) ]
494
492
pub struct Line {
495
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
496
493
width : Option < f64 > ,
497
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
498
494
shape : Option < LineShape > ,
499
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
500
495
smoothing : Option < f64 > ,
501
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
502
496
dash : Option < DashType > ,
503
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
504
497
simplify : Option < bool > ,
505
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
506
498
color : Option < Box < dyn Color > > ,
507
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
508
499
cauto : Option < bool > ,
509
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
510
500
cmin : Option < f64 > ,
511
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
512
501
cmax : Option < f64 > ,
513
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
514
502
cmid : Option < f64 > ,
515
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "colorscale" ) ]
503
+ #[ serde( rename = "colorscale" ) ]
516
504
color_scale : Option < ColorScale > ,
517
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "autocolorscale" ) ]
505
+ #[ serde( rename = "autocolorscale" ) ]
518
506
auto_color_scale : Option < bool > ,
519
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "reversescale" ) ]
507
+ #[ serde( rename = "reversescale" ) ]
520
508
reverse_scale : Option < bool > ,
521
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "outliercolor" ) ]
509
+ #[ serde( rename = "outliercolor" ) ]
522
510
outlier_color : Option < Box < dyn Color > > ,
523
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "outlierwidth" ) ]
511
+ #[ serde( rename = "outlierwidth" ) ]
524
512
outlier_width : Option < usize > ,
525
513
}
526
514
@@ -685,16 +673,15 @@ impl Gradient {
685
673
}
686
674
}
687
675
676
+ #[ serde_with:: skip_serializing_none]
688
677
#[ derive( Serialize , Clone , Debug , Default ) ]
689
678
pub struct TickFormatStop {
690
679
enabled : bool ,
691
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "dtickrange" ) ]
680
+ #[ serde( rename = "dtickrange" ) ]
692
681
dtick_range : Option < private:: NumOrStringCollection > ,
693
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
694
682
value : Option < String > ,
695
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
696
683
name : Option < String > ,
697
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "templateitemname" ) ]
684
+ #[ serde( rename = "templateitemname" ) ]
698
685
template_item_name : Option < String > ,
699
686
}
700
687
@@ -732,12 +719,13 @@ impl TickFormatStop {
732
719
}
733
720
}
734
721
722
+ #[ serde_with:: skip_serializing_none]
735
723
#[ derive( Serialize , Clone , Debug ) ]
736
724
pub struct ColorBar {
737
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "thicknessmode" ) ]
725
+ #[ serde( rename = "thicknessmode" ) ]
738
726
thickness_mode : Option < ThicknessMode > ,
739
727
thickness : usize ,
740
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "lenmode" ) ]
728
+ #[ serde( rename = "lenmode" ) ]
741
729
len_mode : Option < ThicknessMode > ,
742
730
len : usize ,
743
731
x : f64 ,
@@ -750,60 +738,56 @@ pub struct ColorBar {
750
738
y_anchor : Anchor ,
751
739
#[ serde( rename = "ypad" ) ]
752
740
y_pad : f64 ,
753
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "outlinecolor" ) ]
741
+ #[ serde( rename = "outlinecolor" ) ]
754
742
outline_color : Option < Box < dyn Color > > ,
755
743
#[ serde( rename = "outlinewidth" ) ]
756
744
outline_width : usize ,
757
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "bordercolor" ) ]
745
+ #[ serde( rename = "bordercolor" ) ]
758
746
border_color : Option < Box < dyn Color > > ,
759
747
#[ serde( rename = "borderwidth" ) ]
760
748
border_width : usize ,
761
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "bgcolor" ) ]
749
+ #[ serde( rename = "bgcolor" ) ]
762
750
background_color : Option < Box < dyn Color > > ,
763
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickmode" ) ]
751
+ #[ serde( rename = "tickmode" ) ]
764
752
tick_mode : Option < TickMode > ,
765
753
#[ serde( rename = "nticks" ) ]
766
754
n_ticks : usize ,
767
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
768
755
tick0 : Option < f64 > ,
769
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
770
756
dtick : Option < f64 > ,
771
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickvals" ) ]
757
+ #[ serde( rename = "tickvals" ) ]
772
758
tick_vals : Option < Vec < f64 > > ,
773
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "ticktext" ) ]
759
+ #[ serde( rename = "ticktext" ) ]
774
760
tick_text : Option < Vec < String > > ,
775
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
776
761
ticks : Option < String > ,
777
762
#[ serde( rename = "ticklen" ) ]
778
763
tick_len : usize ,
779
764
#[ serde( rename = "tickwidth" ) ]
780
765
tick_width : usize ,
781
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickcolor" ) ]
766
+ #[ serde( rename = "tickcolor" ) ]
782
767
tick_color : Option < Box < dyn Color > > ,
783
768
#[ serde( rename = "showticklabels" ) ]
784
769
show_tick_labels : bool ,
785
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickfont" ) ]
770
+ #[ serde( rename = "tickfont" ) ]
786
771
tick_font : Option < Font > ,
787
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickangle" ) ]
772
+ #[ serde( rename = "tickangle" ) ]
788
773
tick_angle : Option < f64 > ,
789
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickformat" ) ]
774
+ #[ serde( rename = "tickformat" ) ]
790
775
tick_format : Option < String > ,
791
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickformatstops" ) ]
776
+ #[ serde( rename = "tickformatstops" ) ]
792
777
tick_format_stops : Option < Vec < TickFormatStop > > ,
793
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tickprefix" ) ]
778
+ #[ serde( rename = "tickprefix" ) ]
794
779
tick_prefix : Option < String > ,
795
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "showtickprefix" ) ]
780
+ #[ serde( rename = "showtickprefix" ) ]
796
781
show_tick_prefix : Option < String > ,
797
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "ticksuffix" ) ]
782
+ #[ serde( rename = "ticksuffix" ) ]
798
783
tick_suffix : Option < String > ,
799
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "showticksuffix" ) ]
784
+ #[ serde( rename = "showticksuffix" ) ]
800
785
show_tick_suffix : Option < String > ,
801
786
separate_thousands : bool ,
802
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "exponentformat" ) ]
787
+ #[ serde( rename = "exponentformat" ) ]
803
788
exponent_format : Option < ExponentFormat > ,
804
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "showexponent" ) ]
789
+ #[ serde( rename = "showexponent" ) ]
805
790
show_exponent : Option < String > ,
806
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
807
791
title : Option < Title > ,
808
792
}
809
793
@@ -1057,47 +1041,38 @@ pub enum AxisSide {
1057
1041
Right ,
1058
1042
}
1059
1043
1044
+ #[ serde_with:: skip_serializing_none]
1060
1045
#[ derive( Serialize , Clone , Debug , Default ) ]
1061
1046
pub struct Marker {
1062
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1063
1047
symbol : Option < MarkerSymbol > ,
1064
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1065
1048
opacity : Option < f64 > ,
1066
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1067
1049
size : Option < Dim < usize > > ,
1068
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "maxdisplayed" ) ]
1050
+ #[ serde( rename = "maxdisplayed" ) ]
1069
1051
max_displayed : Option < usize > ,
1070
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "sizeref" ) ]
1052
+ #[ serde( rename = "sizeref" ) ]
1071
1053
size_ref : Option < usize > ,
1072
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "sizemin" ) ]
1054
+ #[ serde( rename = "sizemin" ) ]
1073
1055
size_min : Option < usize > ,
1074
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "sizemode" ) ]
1056
+ #[ serde( rename = "sizemode" ) ]
1075
1057
size_mode : Option < SizeMode > ,
1076
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1077
1058
line : Option < Line > ,
1078
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1079
1059
gradient : Option < Gradient > ,
1080
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1081
1060
color : Option < Dim < Box < dyn Color > > > ,
1082
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1083
1061
cauto : Option < bool > ,
1084
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1085
1062
cmin : Option < f64 > ,
1086
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1087
1063
cmax : Option < f64 > ,
1088
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1089
1064
cmid : Option < f64 > ,
1090
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "colorscale" ) ]
1065
+ #[ serde( rename = "colorscale" ) ]
1091
1066
color_scale : Option < ColorScale > ,
1092
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "autocolorscale" ) ]
1067
+ #[ serde( rename = "autocolorscale" ) ]
1093
1068
auto_color_scale : Option < bool > ,
1094
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "reversescale" ) ]
1069
+ #[ serde( rename = "reversescale" ) ]
1095
1070
reverse_scale : Option < bool > ,
1096
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "showscale" ) ]
1071
+ #[ serde( rename = "showscale" ) ]
1097
1072
show_scale : Option < bool > ,
1098
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "colorbar" ) ]
1073
+ #[ serde( rename = "colorbar" ) ]
1099
1074
color_bar : Option < ColorBar > ,
1100
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "outliercolor" ) ]
1075
+ #[ serde( rename = "outliercolor" ) ]
1101
1076
outlier_color : Option < Box < dyn Color > > ,
1102
1077
}
1103
1078
@@ -1217,13 +1192,11 @@ impl Marker {
1217
1192
}
1218
1193
}
1219
1194
1195
+ #[ serde_with:: skip_serializing_none]
1220
1196
#[ derive( Serialize , Clone , Debug , Default ) ]
1221
1197
pub struct Font {
1222
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1223
1198
family : Option < String > ,
1224
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1225
1199
size : Option < usize > ,
1226
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1227
1200
color : Option < Box < dyn Color > > ,
1228
1201
}
1229
1202
@@ -1279,26 +1252,22 @@ impl Pad {
1279
1252
}
1280
1253
}
1281
1254
1255
+ #[ serde_with:: skip_serializing_none]
1282
1256
#[ derive( Serialize , Clone , Debug , Default ) ]
1283
1257
pub struct Title {
1284
1258
text : String ,
1285
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1286
1259
font : Option < Font > ,
1287
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1288
1260
side : Option < Side > ,
1289
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "xref" ) ]
1261
+ #[ serde( rename = "xref" ) ]
1290
1262
x_ref : Option < Reference > ,
1291
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "yref" ) ]
1263
+ #[ serde( rename = "yref" ) ]
1292
1264
y_ref : Option < Reference > ,
1293
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1294
1265
x : Option < f64 > ,
1295
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1296
1266
y : Option < f64 > ,
1297
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "xanchor" ) ]
1267
+ #[ serde( rename = "xanchor" ) ]
1298
1268
x_anchor : Option < Anchor > ,
1299
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "yanchor" ) ]
1269
+ #[ serde( rename = "yanchor" ) ]
1300
1270
y_anchor : Option < Anchor > ,
1301
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1302
1271
pad : Option < Pad > ,
1303
1272
}
1304
1273
@@ -1362,17 +1331,16 @@ impl Title {
1362
1331
}
1363
1332
}
1364
1333
1334
+ #[ serde_with:: skip_serializing_none]
1365
1335
#[ derive( Serialize , Clone , Debug , Default ) ]
1366
1336
pub struct Label {
1367
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "bgcolor" ) ]
1337
+ #[ serde( rename = "bgcolor" ) ]
1368
1338
background_color : Option < Box < dyn Color > > ,
1369
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "bordercolor" ) ]
1339
+ #[ serde( rename = "bordercolor" ) ]
1370
1340
border_color : Option < Box < dyn Color > > ,
1371
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1372
1341
font : Option < Font > ,
1373
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1374
1342
align : Option < String > ,
1375
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "namelength" ) ]
1343
+ #[ serde( rename = "namelength" ) ]
1376
1344
name_length : Option < Dim < i32 > > ,
1377
1345
}
1378
1346
@@ -1428,32 +1396,25 @@ impl Default for ErrorType {
1428
1396
}
1429
1397
}
1430
1398
1399
+ #[ serde_with:: skip_serializing_none]
1431
1400
#[ derive( Serialize , Clone , Debug , Default ) ]
1432
1401
pub struct ErrorData {
1433
1402
r#type : ErrorType ,
1434
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1435
1403
array : Option < Vec < f64 > > ,
1436
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1437
1404
visible : Option < bool > ,
1438
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1439
1405
symmetric : Option < bool > ,
1440
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "arrayminus" ) ]
1406
+ #[ serde( rename = "arrayminus" ) ]
1441
1407
array_minus : Option < Vec < f64 > > ,
1442
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1443
1408
value : Option < f64 > ,
1444
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "valueminus" ) ]
1409
+ #[ serde( rename = "valueminus" ) ]
1445
1410
value_minus : Option < f64 > ,
1446
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "traceref" ) ]
1411
+ #[ serde( rename = "traceref" ) ]
1447
1412
trace_ref : Option < usize > ,
1448
- #[ serde( skip_serializing_if = "Option::is_none" , rename = "tracerefminus" ) ]
1413
+ #[ serde( rename = "tracerefminus" ) ]
1449
1414
trace_ref_minus : Option < usize > ,
1450
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1451
1415
copy_ystyle : Option < bool > ,
1452
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1453
1416
color : Option < Box < dyn Color > > ,
1454
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1455
1417
thickness : Option < f64 > ,
1456
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
1457
1418
width : Option < usize > ,
1458
1419
}
1459
1420
0 commit comments