From 480ef70eb8907eb3d872f1e23aa96837ba254918 Mon Sep 17 00:00:00 2001 From: Zhenyi Zhou Date: Tue, 27 May 2025 01:38:49 +0800 Subject: [PATCH] add customdata to HeatMap --- plotly/src/traces/heat_map.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plotly/src/traces/heat_map.rs b/plotly/src/traces/heat_map.rs index 0fdf85c8..cd108283 100644 --- a/plotly/src/traces/heat_map.rs +++ b/plotly/src/traces/heat_map.rs @@ -7,6 +7,7 @@ use crate::{ common::{ Calendar, ColorBar, ColorScale, Dim, HoverInfo, Label, LegendGroupTitle, PlotType, Visible, }, + private::NumOrStringCollection, Trace, }; @@ -71,6 +72,11 @@ where color_scale: Option, #[serde(rename = "connectgaps")] connect_gaps: Option, + /// Assigns extra data each datum. This may be useful when listening to + /// hover, click and selection events. Note that, "scatter" traces also + /// appends customdata items in the markers DOM elements + #[serde(rename = "customdata")] + custom_data: Option, #[serde(rename = "hoverinfo")] hover_info: Option, #[serde(rename = "hoverlabel")]