Skip to content

Commit

Permalink
MME graph - today data point check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen authored and Amy Chen committed Nov 14, 2024
1 parent cd07b3b commit a7626d6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/graph/MMEGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,16 @@ export default class MMEGraph extends Component {
];
data = [
...data,
...categories.map((o) => ({ ...todayDataPoint, category: o })),
...categories
.filter(
(c) =>
!data.find(
(d) =>
d.category === c &&
dateFormat("", d[xFieldName], "YYYY-MM-DD") === today
)
)
.map((o) => ({ ...todayDataPoint, category: o })),
];
maxDate = new Date();
}
Expand Down

0 comments on commit a7626d6

Please sign in to comment.