Skip to content

Commit 16a2e34

Browse files
committed
add customdata to HeatMap
1 parent d6326fc commit 16a2e34

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plotly/src/traces/heat_map.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use serde::Serialize;
66
use crate::{
77
common::{
88
Calendar, ColorBar, ColorScale, Dim, HoverInfo, Label, LegendGroupTitle, PlotType, Visible,
9-
},
10-
Trace,
9+
}, private::NumOrStringCollection, Trace
1110
};
1211

1312
#[derive(Debug, Clone)]
@@ -71,6 +70,11 @@ where
7170
color_scale: Option<ColorScale>,
7271
#[serde(rename = "connectgaps")]
7372
connect_gaps: Option<bool>,
73+
/// Assigns extra data each datum. This may be useful when listening to
74+
/// hover, click and selection events. Note that, "scatter" traces also
75+
/// appends customdata items in the markers DOM elements
76+
#[serde(rename = "customdata")]
77+
custom_data: Option<NumOrStringCollection>,
7478
#[serde(rename = "hoverinfo")]
7579
hover_info: Option<HoverInfo>,
7680
#[serde(rename = "hoverlabel")]

0 commit comments

Comments
 (0)