@@ -13,6 +13,7 @@ pub mod update_menu;
1313
1414mod annotation;
1515mod axis;
16+ mod geo;
1617mod grid;
1718mod legend;
1819mod mapbox;
@@ -27,6 +28,7 @@ pub use self::axis::{
2728 RangeMode , RangeSelector , RangeSlider , RangeSliderYAxis , SelectorButton , SelectorStep ,
2829 SliderRangeMode , StepMode , TicksDirection , TicksPosition ,
2930} ;
31+ pub use self :: geo:: LayoutGeo ;
3032pub use self :: grid:: { GridDomain , GridPattern , GridXSide , GridYSide , LayoutGrid , RowOrder } ;
3133pub use self :: legend:: { Legend , TraceOrder } ;
3234pub use self :: mapbox:: { Center , Mapbox , MapboxStyle } ;
@@ -137,41 +139,6 @@ pub enum SelectDirection {
137139 Any ,
138140}
139141
140- #[ derive( Serialize , Clone , Debug , FieldSetter ) ]
141- pub struct Geo {
142- /// Sets the zoom level of the map.
143- zoom : Option < u8 > ,
144- /// Sets the projection of the map
145- #[ field_setter( default = "Projection::new().projection_type(ProjectionType::Orthographic)" ) ]
146- projection : Option < Projection > ,
147- /// If to show the ocean or not
148- #[ field_setter( default = "Some(true)" ) ]
149- showocean : Option < bool > ,
150- /// Sets the color of the ocean
151- #[ field_setter( default = "'rgb(0, 255, 255)'" ) ]
152- oceancolor : Option < Box < dyn Color > > ,
153- /// If to show the land or not
154- showland : Option < bool > ,
155- /// Sets the color of the land
156- landcolor : Option < Box < dyn Color > > ,
157- /// If to show lakes or not
158- showlakes : Option < bool > ,
159- /// Sets the color of the lakes
160- lakecolor : Option < Box < dyn Color > > ,
161- /// If to show countries (borders) or not
162- showcountries : Option < bool > ,
163- /// Configures the longitude axis
164- lonaxis : Option < Axis > ,
165- /// Configures the latitude axis
166- lataxis : Option < Axis > ,
167- }
168-
169- impl Geo {
170- pub fn new ( ) -> Self {
171- Default :: default ( )
172- }
173- }
174-
175142#[ serde_with:: skip_serializing_none]
176143#[ derive( Serialize , Debug , Clone , FieldSetter ) ]
177144pub struct Template {
@@ -309,7 +276,10 @@ pub struct LayoutFields {
309276 y_axis8 : Option < Box < Axis > > ,
310277 #[ serde( rename = "zaxis8" ) ]
311278 z_axis8 : Option < Box < Axis > > ,
279+ // ternary: Option<LayoutTernary>,
312280 scene : Option < LayoutScene > ,
281+ geo : Option < LayoutGeo > ,
282+ // polar: Option<LayoutPolar>,
313283 annotations : Option < Vec < Annotation > > ,
314284 shapes : Option < Vec < Shape > > ,
315285 #[ serde( rename = "newshape" ) ]
0 commit comments