Show fewer graph ticks on mobile so they don't overlap. padding
This commit is contained in:
parent
087e5f89fd
commit
9c19966ef9
|
@ -21,9 +21,11 @@ export function DailyCountChart(props: {
|
||||||
}))
|
}))
|
||||||
const data = [{ id: 'Count', data: points, color: '#11b981' }]
|
const data = [{ id: 'Count', data: points, color: '#11b981' }]
|
||||||
|
|
||||||
|
const bottomAxisTicks = width && width < 600 ? 6 : undefined
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="w-full"
|
className="w-full overflow-hidden"
|
||||||
style={{ height: !small && (!width || width >= 800) ? 400 : 250 }}
|
style={{ height: !small && (!width || width >= 800) ? 400 : 250 }}
|
||||||
>
|
>
|
||||||
<ResponsiveLine
|
<ResponsiveLine
|
||||||
|
@ -33,6 +35,7 @@ export function DailyCountChart(props: {
|
||||||
type: 'time',
|
type: 'time',
|
||||||
}}
|
}}
|
||||||
axisBottom={{
|
axisBottom={{
|
||||||
|
tickValues: bottomAxisTicks,
|
||||||
format: (date) => dayjs(date).format('MMM DD'),
|
format: (date) => dayjs(date).format('MMM DD'),
|
||||||
}}
|
}}
|
||||||
colors={{ datum: 'color' }}
|
colors={{ datum: 'color' }}
|
||||||
|
@ -66,9 +69,11 @@ export function DailyPercentChart(props: {
|
||||||
}))
|
}))
|
||||||
const data = [{ id: 'Percent', data: points, color: '#11b981' }]
|
const data = [{ id: 'Percent', data: points, color: '#11b981' }]
|
||||||
|
|
||||||
|
const bottomAxisTicks = width && width < 600 ? 6 : undefined
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="w-full"
|
className="w-full overflow-hidden"
|
||||||
style={{ height: !small && (!width || width >= 800) ? 400 : 250 }}
|
style={{ height: !small && (!width || width >= 800) ? 400 : 250 }}
|
||||||
>
|
>
|
||||||
<ResponsiveLine
|
<ResponsiveLine
|
||||||
|
@ -81,6 +86,7 @@ export function DailyPercentChart(props: {
|
||||||
format: (value) => `${value}%`,
|
format: (value) => `${value}%`,
|
||||||
}}
|
}}
|
||||||
axisBottom={{
|
axisBottom={{
|
||||||
|
tickValues: bottomAxisTicks,
|
||||||
format: (date) => dayjs(date).format('MMM DD'),
|
format: (date) => dayjs(date).format('MMM DD'),
|
||||||
}}
|
}}
|
||||||
colors={{ datum: 'color' }}
|
colors={{ datum: 'color' }}
|
||||||
|
|
|
@ -153,7 +153,7 @@ export function CustomAnalytics(props: {
|
||||||
weekOnWeekRetention,
|
weekOnWeekRetention,
|
||||||
} = props
|
} = props
|
||||||
return (
|
return (
|
||||||
<Col>
|
<Col className="px-2 sm:px-0">
|
||||||
<Title text="Active users" />
|
<Title text="Active users" />
|
||||||
<p className="text-gray-500">
|
<p className="text-gray-500">
|
||||||
An active user is a user who has traded in, commented on, or created a
|
An active user is a user who has traded in, commented on, or created a
|
||||||
|
|
Loading…
Reference in New Issue
Block a user