feat: burndown chart (#268)

* chore: recharts dependencie added

* chore: tpye added for issue completed at

* feat: date range helper fn added

* feat: progress chart added

* feat: ideal task line added in progress chart

* feat: chart legends added
This commit is contained in:
Anmol Singh Bhatia 2023-02-10 18:40:02 +05:30 committed by GitHub
parent af22dc9c58
commit bb4ffec7e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 528 additions and 165 deletions

View file

@ -25,6 +25,16 @@ export const findHowManyDaysLeft = (date: string | Date) => {
return Math.ceil(timeDiff / (1000 * 3600 * 24));
};
export const getDatesInRange = (startDate: Date, endDate: Date) => {
const date = new Date(startDate.getTime());
const dates = [];
while (date <= endDate) {
dates.push(new Date(date));
date.setDate(date.getDate() + 1);
}
return dates;
};
export const timeAgo = (time: any) => {
switch (typeof time) {
case "number":