mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
Colors
This commit is contained in:
parent
ded566b2fe
commit
2a3de76284
@ -184,7 +184,7 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
order: 1,
|
order: 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
flagTypeNames, // Add this to the return object
|
flagTypeNames,
|
||||||
};
|
};
|
||||||
}, [creationArchiveData, theme]);
|
}, [creationArchiveData, theme]);
|
||||||
|
|
||||||
@ -200,7 +200,6 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
const data =
|
const data =
|
||||||
notEnoughData || isLoading ? placeholderData : aggregateOrProjectData;
|
notEnoughData || isLoading ? placeholderData : aggregateOrProjectData;
|
||||||
|
|
||||||
// Get flag type names for legend filtering
|
|
||||||
const flagTypeNames = isAggregate
|
const flagTypeNames = isAggregate
|
||||||
? (aggregateHealthData as any).flagTypeNames || []
|
? (aggregateHealthData as any).flagTypeNames || []
|
||||||
: [];
|
: [];
|
||||||
@ -234,7 +233,6 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add custom "Created Flags" legend item
|
|
||||||
filtered.push({
|
filtered.push({
|
||||||
text: 'Created Flags',
|
text: 'Created Flags',
|
||||||
fillStyle: theme.palette.success.main,
|
fillStyle: theme.palette.success.main,
|
||||||
@ -256,11 +254,6 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
locale: locationSettings.locale,
|
locale: locationSettings.locale,
|
||||||
interaction: {
|
|
||||||
intersect: false,
|
|
||||||
axis: 'xy',
|
|
||||||
mode: 'nearest',
|
|
||||||
},
|
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
type: 'time',
|
type: 'time',
|
||||||
@ -268,17 +261,14 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
unit: 'week',
|
unit: 'week',
|
||||||
tooltipFormat: 'PPP',
|
tooltipFormat: 'PPP',
|
||||||
},
|
},
|
||||||
stacked: true,
|
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
type: 'linear',
|
type: 'linear',
|
||||||
display: true,
|
|
||||||
position: 'left',
|
position: 'left',
|
||||||
beginAtZero: true,
|
beginAtZero: true,
|
||||||
stacked: true,
|
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Number of Flags',
|
text: 'Number of flags',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
y1: {
|
y1: {
|
||||||
@ -288,11 +278,14 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
|||||||
beginAtZero: true,
|
beginAtZero: true,
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Archive Percentage (%)',
|
text: 'Ratio',
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
drawOnChartArea: false,
|
drawOnChartArea: false,
|
||||||
},
|
},
|
||||||
|
ticks: {
|
||||||
|
callback: (value) => `${value}%`,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user