Skip to content

Commit

Permalink
ui: adjust large legends for usage logs (PROJQUAY-7384) (quay#2978)
Browse files Browse the repository at this point in the history
adjust large legends for usage logs
  • Loading branch information
Marcusk19 authored Jun 26, 2024
1 parent 6c371c5 commit 1d4865a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/src/routes/UsageLogs/UsageLogsGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ export default function UsageLogsGraph(props: UsageLogsGraphProps) {
x: [new Date(props.starttime), new Date(props.endtime)],
y: [0, maxRange],
}}
legendOrientation="vertical"
legendPosition="right"
legendOrientation={
getLegendData().length >= 12 ? 'horizontal' : 'vertical'
}
legendPosition={getLegendData().length >= 12 ? 'bottom' : 'right'}
legendData={getLegendData()}
legendAllowWrap
name="usage-logs-graph"
padding={{
bottom: 50,
bottom: 10 * getLegendData().length,
left: 80,
right: 500, // Adjusted to accommodate legend
top: 50,
Expand Down

0 comments on commit 1d4865a

Please sign in to comment.