tweak axes, hide y axis on mobile

This commit is contained in:
slice 2018-07-13 22:12:59 -07:00
parent 1e4e04c025
commit ebe6105fb3
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
2 changed files with 18 additions and 6 deletions

View File

@ -2,13 +2,21 @@
width: 100%;
}
.recharts-cartesian-axis-tick-value {
font-size: 0.85em;
}
.recharts-tooltip-wrapper .recharts-default-tooltip {
padding: 0 0.5rem !important;
padding: 0 0.5em !important;
border-radius: 0.2rem;
font-size: 0.85rem;
font-size: 0.85em;
opacity: 0.85;
}
.recharts-default-tooltip li {
color: inherit !important;
}
.recharts-tooltip-item-value {
font-family: PragmataPro, Menlo, "DejaVu Sans Mono", monospace;
}

View File

@ -63,10 +63,14 @@ export default class Graph extends Component {
tickFormatter={(tick) => ms(Date.now() - tick)}
tickLine={false}
/>
<YAxis
dataKey="latency"
tickLine={false}
/>
{this.isSmallScreen()
? null
: <YAxis
dataKey="latency"
tickLine={false}
tickFormatter={(tick) => `${tick}ms`}
/>
}
<CartesianGrid strokeDasharray="1 1" />
<Tooltip
isAnimationActive={false}