We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf4f65c commit 1660db8Copy full SHA for 1660db8
src/plotly-graph-card.ts
@@ -585,6 +585,14 @@ export class PlotlyGraph extends HTMLElement {
585
}
586
patchLonelyDatapoints(xs, ys);
587
588
+ if (xs.length === 0 && ys.length === 0) {
589
+ /*
590
+ Traces with no data are removed from the legend by plotly.
591
+ Setting them to have null element prevents that.
592
+ */
593
+ xs = [null];
594
+ ys = [null];
595
+ }
596
const customdatum = { unit_of_measurement: unit, name, attributes };
597
const customdata = xs.map(() => customdatum);
598
const mergedTrace = merge(
0 commit comments