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:
parent
af22dc9c58
commit
bb4ffec7e8
8 changed files with 528 additions and 165 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue