Skip to content

Commit eaa8673

Browse files
committed
let users override legendgroup
1 parent b2366ac commit eaa8673

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/plotly-graph-card.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,12 @@ export class PlotlyGraph extends HTMLElement {
349349
if (mergedTrace.show_value) {
350350
merge(mergedTrace, {
351351
legendgroup: "group" + traceIdx,
352-
});
352+
}, mergedTrace);
353353
traces.push({
354354
// @ts-expect-error (texttemplate missing in plotly typings)
355355
texttemplate: `%{y}%{customdata.unit_of_measurement}`, // here so it can be overwritten
356356
...mergedTrace,
357357
mode: "text+markers",
358-
legendgroup: "group" + traceIdx,
359358
showlegend: false,
360359
hoverinfo: "skip",
361360
textposition: "middle right",
@@ -377,7 +376,6 @@ export class PlotlyGraph extends HTMLElement {
377376
((this.config.hours_to_show * 1000 * 60 * 60) / 100);
378377
traces.push({
379378
...mergedTrace,
380-
legendgroup: "group" + traceIdx,
381379
marker: {
382380
color: "transparent",
383381
},

0 commit comments

Comments
 (0)