mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
(fix) working - show monthly team spend on ui
This commit is contained in:
parent
794dcfda41
commit
37d0087b56
1 changed files with 38 additions and 1 deletions
|
@ -24,6 +24,29 @@ type CustomTooltipTypeBar = {
|
|||
label: any;
|
||||
};
|
||||
|
||||
const chartData = [
|
||||
{
|
||||
date: 'Jan 23',
|
||||
proj1: 167,
|
||||
proj2: 145,
|
||||
proj3: 135,
|
||||
},
|
||||
{
|
||||
date: 'Jan 24',
|
||||
proj1: 170,
|
||||
proj2: 150,
|
||||
proj3: 140,
|
||||
},
|
||||
{
|
||||
date: 'Jan 25',
|
||||
proj1: 160,
|
||||
proj2: 140,
|
||||
proj3: 130,
|
||||
},
|
||||
// Add more data for additional days as needed
|
||||
];
|
||||
|
||||
|
||||
const customTooltip = (props: CustomTooltipTypeBar) => {
|
||||
const { payload, active } = props;
|
||||
if (!active || !payload) return null;
|
||||
|
@ -317,7 +340,21 @@ const UsagePage: React.FC<UsagePageProps> = ({
|
|||
</Grid>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Title>Coming Soon</Title>
|
||||
<Grid numItems={2} className="gap-2 p-10 h-[75vh] w-full">
|
||||
<Col numColSpan={2}>
|
||||
<Card>
|
||||
<Title>Monthly Team Spend</Title>
|
||||
<BarChart
|
||||
className="h-72"
|
||||
data={chartData}
|
||||
index="date"
|
||||
categories={['proj1', 'proj2', 'proj3']}
|
||||
yAxisWidth={30}
|
||||
stack={true}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Grid>
|
||||
</TabPanel>
|
||||
</TabPanels>
|
||||
</TabGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue