fixed compare display
This commit is contained in:
@@ -2,6 +2,7 @@ import { api } from "../../react-openapi";
|
||||
import { LatestItem } from "../components/LatestItemsList";
|
||||
import { ChartDataPoint } from "../components/HistoryChart";
|
||||
import * as React from "react";
|
||||
import { format } from "./dateUtils";
|
||||
import MonetizationOnIcon from "@mui/icons-material/MonetizationOn";
|
||||
|
||||
import {
|
||||
@@ -129,7 +130,10 @@ export async function fetchAggregatedData(
|
||||
arr.map((x) => ({
|
||||
id: x.label,
|
||||
amount: x.amount,
|
||||
compareAmount: x.compare
|
||||
compareAmount: x.compare,
|
||||
compareLabel: x.prevStart && x.prevEnd
|
||||
? `${format(x.prevStart)} - ${format(x.prevEnd)}`
|
||||
: undefined
|
||||
}));
|
||||
|
||||
const chartData = {
|
||||
|
||||
Reference in New Issue
Block a user