Skip to content

Commit f2afe4e

Browse files
committed
2 parents 2b4b20e + 9515a93 commit f2afe4e

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

plotly/src/layout/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,6 @@ impl Geo {
14881488
}
14891489
}
14901490

1491-
14921491
#[derive(Serialize, Debug, Clone)]
14931492
/// If "cube", this scene's axes are drawn as a cube, regardless of the axes'
14941493
/// ranges. If "data", this scene's axes are drawn in proportion with the axes'

plotly/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub use traces::{
4040
// Bring the different trace types into the top-level scope
4141
pub use traces::{
4242
Bar, BoxPlot, Candlestick, Contour, DensityMapbox, HeatMap, Histogram, Image, Mesh3D, Ohlc,
43-
Pie, Sankey, Scatter, Scatter3D, ScatterMapbox, ScatterGeo, ScatterPolar, Surface, Table,
43+
Pie, Sankey, Scatter, Scatter3D, ScatterGeo, ScatterMapbox, ScatterPolar, Surface, Table,
4444
};
4545

4646
pub trait Restyle: serde::Serialize {}

plotly/src/traces/heat_map.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::{
77
common::{
88
Calendar, ColorBar, ColorScale, Dim, HoverInfo, Label, LegendGroupTitle, PlotType, Visible,
99
},
10+
private::NumOrStringCollection,
1011
Trace,
1112
};
1213

@@ -71,6 +72,11 @@ where
7172
color_scale: Option<ColorScale>,
7273
#[serde(rename = "connectgaps")]
7374
connect_gaps: Option<bool>,
75+
/// Assigns extra data each datum. This may be useful when listening to
76+
/// hover, click and selection events. Note that, "scatter" traces also
77+
/// appends customdata items in the markers DOM elements
78+
#[serde(rename = "customdata")]
79+
custom_data: Option<NumOrStringCollection>,
7480
#[serde(rename = "hoverinfo")]
7581
hover_info: Option<HoverInfo>,
7682
#[serde(rename = "hoverlabel")]

plotly/src/traces/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub mod pie;
1414
pub mod sankey;
1515
pub mod scatter;
1616
pub mod scatter3d;
17+
pub mod scatter_geo;
1718
pub mod scatter_mapbox;
1819
pub mod scatter_geo;
1920
mod scatter_polar;
@@ -33,6 +34,7 @@ pub use pie::Pie;
3334
pub use sankey::Sankey;
3435
pub use scatter::Scatter;
3536
pub use scatter3d::Scatter3D;
37+
pub use scatter_geo::ScatterGeo;
3638
pub use scatter_mapbox::ScatterMapbox;
3739
pub use scatter_geo::ScatterGeo;
3840
pub use scatter_polar::ScatterPolar;

plotly/src/traces/scatter_geo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ mod tests {
342342
.hover_label(Label::new())
343343
.ui_revision(6);
344344
let expected = json!({
345-
"type": "scattergegeo",
345+
"type": "scattergeo",
346346
"lat": [45.5017],
347347
"lon": [-73.5673],
348348
"name": "name",
@@ -379,4 +379,4 @@ mod tests {
379379

380380
assert_eq!(to_value(scatter_geo).unwrap(), expected);
381381
}
382-
}
382+
}

0 commit comments

Comments
 (0)