Skip to content

Commit

Permalink
Remove the d3 error on init
Browse files Browse the repository at this point in the history
  • Loading branch information
bctcvai committed Nov 8, 2024
1 parent b3fab97 commit e335822
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/js/annotation/entity-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,12 @@ export class EntityTimeline extends BaseTimeline {
.append("defs")
.append("path")
.attr("id", (d) => d.pathId.id)
.attr("d", (d) => mainLine(d.graphData));
.attr("d", (d) => {
let nonNullsAndNaNsOnly = d.graphData.filter(
(entry) => entry.value != null && !isNaN(entry.value)
);
return mainLine(nonNullsAndNaNsOnly);
});

this._mainLineG
.append("g")
Expand Down

0 comments on commit e335822

Please sign in to comment.