forked from github/plane
fix: progress chart x-axis values (#1409)
* fix: x-axis dates value in the progress chart * chore: loader for active cycle
This commit is contained in:
parent
7f1def2041
commit
7fbf0e6358
@ -52,7 +52,7 @@ const ProgressChart: React.FC<Props> = ({ distribution, startDate, endDate, tota
|
||||
const maxDates = 4;
|
||||
const totalDates = dates.length;
|
||||
|
||||
if (totalDates <= maxDates) return dates;
|
||||
if (totalDates <= maxDates) return dates.map((d) => renderShortNumericDateFormat(d));
|
||||
else {
|
||||
const interval = Math.ceil(totalDates / maxDates);
|
||||
const limitedDates = [];
|
||||
|
@ -101,6 +101,13 @@ export const ActiveCycleDetails: React.FC = () => {
|
||||
: null
|
||||
) as { data: IIssue[] | undefined };
|
||||
|
||||
if (!currentCycle)
|
||||
return (
|
||||
<Loader>
|
||||
<Loader.Item height="250px" />
|
||||
</Loader>
|
||||
);
|
||||
|
||||
if (!cycle)
|
||||
return (
|
||||
<div className="flex w-full items-center justify-start rounded-[10px] bg-brand-surface-2 px-6 py-4">
|
||||
|
Loading…
Reference in New Issue
Block a user