diff --git a/ViewWeightGraph.tsx b/ViewWeightGraph.tsx index f21a25c..50c04d3 100644 --- a/ViewWeightGraph.tsx +++ b/ViewWeightGraph.tsx @@ -15,11 +15,14 @@ import Weight from "./weight"; export default function ViewWeightGraph() { const [weights, setWeights] = useState(); - const [period, setPeriod] = useState(Periods.Monthly); + const [period, setPeriod] = useState(Periods.TwoMonths); useEffect(() => { let difference = "-7 days"; if (period === Periods.Monthly) difference = "-1 months"; + else if (period === Periods.TwoMonths) difference = "-2 months"; + else if (period === Periods.ThreeMonths) difference = "-3 months"; + else if (period === Periods.SixMonths) difference = "-6 months"; else if (period === Periods.Yearly) difference = "-1 years"; let group = "%Y-%m-%d"; @@ -81,6 +84,9 @@ export default function ViewWeightGraph() { items={[ { value: Periods.Weekly, label: Periods.Weekly }, { value: Periods.Monthly, label: Periods.Monthly }, + { value: Periods.TwoMonths, label: Periods.TwoMonths }, + { value: Periods.ThreeMonths, label: Periods.ThreeMonths }, + { value: Periods.SixMonths, label: Periods.SixMonths }, { value: Periods.Yearly, label: Periods.Yearly }, ]} onChange={(value) => setPeriod(value as Periods)}