Skip to content

Commit 03f6f33

Browse files
Fix dataTipRows when value is a vector
1 parent 0051a43 commit 03f6f33

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plotly/plotlyfig_aux/handlegraphics/updateScatter.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
dataTipRows = plotData.DataTipTemplate.DataTipRows;
2727
dataTipRows = dataTipRows(~ismember({dataTipRows.Label},["Size" "Color" "X" "Y" "Z"]));
2828
if numel(dataTipRows) > 0
29-
customLabel = join(string({dataTipRows.Label}) + ": " + string({dataTipRows.Value}), "<br>");
29+
customLabel = "";
30+
for i = 1:numel(dataTipRows)
31+
dataTipRow = dataTipRows(i);
32+
customLabel = customLabel + arrayfun(@(value) string(dataTipRow.Label) + ": " + string(value) + "<br>", dataTipRow.Value);
33+
end
3034
data.hovertext = "X: " + data.x + "<br>" + "Y: " + data.y + "<br>" + customLabel;
3135
data.hoverinfo = "text";
3236
end

0 commit comments

Comments
 (0)