Skip to content

Commit 63ea104

Browse files
committed
add meta to customdata so it is available for texttemplate and hovertemplate
1 parent 7034f76 commit 63ea104

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plotly-graph-card.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,11 @@ export class PlotlyGraph extends HTMLElement {
479479
if (isEntityIdStatisticsConfig(trace)) name += ` (${trace.statistic}) `;
480480
const customdata = data.xs.map((x, i) => ({
481481
unit_of_measurement,
482+
meta,
482483
name,
483-
states: data.states[i],
484-
statistics: data.statistics[i],
484+
state: data.states[i],
485+
statistic: data.statistics[i],
486+
i,
485487
x,
486488
y: data.ys[i],
487489
}));

0 commit comments

Comments
 (0)