mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
Colors
This commit is contained in:
parent
2a3de76284
commit
f9c0a542f4
@ -44,7 +44,6 @@ interface ICreationArchiveChartProps {
|
||||
creationArchiveTrends: GroupedDataByProject<
|
||||
InstanceInsightsSchema['creationArchiveTrends']
|
||||
>;
|
||||
isAggregate?: boolean;
|
||||
isLoading?: boolean;
|
||||
}
|
||||
|
||||
@ -66,7 +65,6 @@ type RawWeekData = {
|
||||
|
||||
export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
||||
creationArchiveTrends,
|
||||
isAggregate,
|
||||
isLoading,
|
||||
}) => {
|
||||
const creationArchiveData = useProjectChartData(creationArchiveTrends);
|
||||
@ -188,9 +186,7 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
||||
};
|
||||
}, [creationArchiveData, theme]);
|
||||
|
||||
const aggregateOrProjectData = isAggregate
|
||||
? aggregateHealthData
|
||||
: creationArchiveData;
|
||||
const aggregateOrProjectData = aggregateHealthData;
|
||||
const notEnoughData = useMemo(
|
||||
() =>
|
||||
!isLoading &&
|
||||
@ -200,14 +196,11 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
||||
const data =
|
||||
notEnoughData || isLoading ? placeholderData : aggregateOrProjectData;
|
||||
|
||||
const flagTypeNames = isAggregate
|
||||
? (aggregateHealthData as any).flagTypeNames || []
|
||||
: [];
|
||||
const flagTypeNames = (aggregateHealthData as any).flagTypeNames || [];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Chart
|
||||
key={isAggregate ? 'aggregate' : 'project'}
|
||||
type='bar'
|
||||
data={data as any}
|
||||
options={{
|
||||
|
@ -68,6 +68,8 @@ export const PerformanceInsights: FC = () => {
|
||||
groupedCreationArchiveData,
|
||||
} = useInsightsData(insights, projects);
|
||||
|
||||
console.log(groupedCreationArchiveData);
|
||||
|
||||
const { isEnterprise } = useUiConfig();
|
||||
const lastUserTrend = userTrends[userTrends.length - 1];
|
||||
const usersTotal = lastUserTrend?.total ?? 0;
|
||||
@ -158,7 +160,6 @@ export const PerformanceInsights: FC = () => {
|
||||
<StyledChartContainer>
|
||||
<CreationArchiveChart
|
||||
creationArchiveTrends={groupedCreationArchiveData}
|
||||
isAggregate={showAllProjects}
|
||||
isLoading={loading}
|
||||
/>
|
||||
</StyledChartContainer>
|
||||
|
Loading…
Reference in New Issue
Block a user