fix usage graph
This commit is contained in:
@@ -215,34 +215,36 @@ export default function BillingUsage({ organization }: Props) {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
{/* Events Chart */}
|
||||||
{/* Events Chart */}
|
<div className="space-y-2">
|
||||||
<div className="space-y-2">
|
<h3 className="text-sm font-medium text-muted-foreground">
|
||||||
<h3 className="text-sm font-medium text-muted-foreground">
|
{useWeeklyIntervals ? 'Weekly Events' : 'Daily Events'}
|
||||||
{useWeeklyIntervals ? 'Weekly Events' : 'Daily Events'}
|
</h3>
|
||||||
</h3>
|
<div className="max-h-[300px] h-[250px] w-full p-4">
|
||||||
<div className="max-h-[300px] h-[250px] w-full p-4">
|
<ResponsiveContainer>
|
||||||
<ResponsiveContainer>
|
<BarChart data={chartData} barSize={useWeeklyIntervals ? 20 : 8}>
|
||||||
<BarChart data={chartData} barSize={useWeeklyIntervals ? 20 : 8}>
|
<RechartTooltip
|
||||||
<RechartTooltip
|
content={<EventsTooltip useWeekly={useWeeklyIntervals} />}
|
||||||
content={<EventsTooltip useWeekly={useWeeklyIntervals} />}
|
cursor={{
|
||||||
/>
|
fill: 'var(--def-200)',
|
||||||
<Bar
|
stroke: 'var(--def-200)',
|
||||||
dataKey="count"
|
}}
|
||||||
isAnimationActive={false}
|
/>
|
||||||
shape={BarShapeBlue}
|
<Bar
|
||||||
/>
|
dataKey="count"
|
||||||
<XAxis {...xAxisProps} dataKey="date" />
|
isAnimationActive={false}
|
||||||
<YAxis {...yAxisProps} domain={[0, 'dataMax']} />
|
shape={BarShapeBlue}
|
||||||
<CartesianGrid
|
/>
|
||||||
horizontal={true}
|
<XAxis {...xAxisProps} dataKey="date" />
|
||||||
vertical={false}
|
<YAxis {...yAxisProps} domain={[0, 'dataMax']} />
|
||||||
strokeDasharray="3 3"
|
<CartesianGrid
|
||||||
strokeOpacity={0.5}
|
horizontal={true}
|
||||||
/>
|
vertical={false}
|
||||||
</BarChart>
|
strokeDasharray="3 3"
|
||||||
</ResponsiveContainer>
|
strokeOpacity={0.5}
|
||||||
</div>
|
/>
|
||||||
|
</BarChart>
|
||||||
|
</ResponsiveContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>,
|
</>,
|
||||||
|
|||||||
Reference in New Issue
Block a user