@@ -2,29 +2,7 @@ use plotly_derive::FieldSetter;
22use serde:: Serialize ;
33
44use crate :: color:: Color ;
5- use crate :: layout:: { Annotation , Axis } ;
6-
7- #[ derive( Serialize , Debug , Clone ) ]
8- /// If "cube", this scene's axes are drawn as a cube, regardless of the axes'
9- /// ranges. If "data", this scene's axes are drawn in proportion with the axes'
10- /// ranges. If "manual", this scene's axes are drawn in proportion with the
11- /// input of "aspectratio" (the default behavior if "aspectratio" is provided).
12- /// If "auto", this scene's axes are drawn using the results of "data" except
13- /// when one axis is more than four times the size of the two others, where in
14- /// that case the results of "cube" are used.
15- /// Default: "auto"
16- #[ derive( Default ) ]
17- pub enum AspectMode {
18- #[ serde( rename = "auto" ) ]
19- #[ default]
20- Auto ,
21- #[ serde( rename = "cube" ) ]
22- Cube ,
23- #[ serde( rename = "data" ) ]
24- Data ,
25- #[ serde( rename = "manual" ) ]
26- Manual ,
27- }
5+ use crate :: layout:: { Annotation , AspectMode , Axis } ;
286
297#[ serde_with:: skip_serializing_none]
308#[ derive( Serialize , Debug , Clone , FieldSetter ) ]
@@ -494,21 +472,6 @@ mod tests {
494472 assert_eq ! ( to_value( camera_center) . unwrap( ) , expected) ;
495473 }
496474
497- #[ test]
498- fn serialize_aspect_mode ( ) {
499- let aspect_mode = AspectMode :: default ( ) ;
500-
501- assert_eq ! ( to_value( aspect_mode) . unwrap( ) , json!( "auto" ) ) ;
502-
503- let aspect_mode = AspectMode :: Data ;
504-
505- assert_eq ! ( to_value( aspect_mode) . unwrap( ) , json!( "data" ) ) ;
506-
507- let aspect_mode = AspectMode :: Cube ;
508-
509- assert_eq ! ( to_value( aspect_mode) . unwrap( ) , json!( "cube" ) ) ;
510- }
511-
512475 #[ test]
513476 fn serialize_up ( ) {
514477 let up = Up :: new ( ) ;
0 commit comments