Skip to content

Commit

Permalink
Replace sort by date and remove reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
moshefortgang committed Nov 21, 2023
1 parent af65c07 commit c91fdec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/dashboard/ArrivalByTimeChart/ArrivalByTimeChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ArrivalByTimeChart({
<ResponsiveContainer width="100%" height={300}>
<LineChart
data={group
.sort((a, b) => (a.gtfs_route_date > b.gtfs_route_date ? 1 : -1))
.sort((a, b) => (a.gtfs_route_date < b.gtfs_route_date ? 1 : -1))
.sort((a, b) => (a.gtfs_route_hour > b.gtfs_route_hour ? 1 : -1))}
margin={{
top: 5,
Expand All @@ -62,7 +62,7 @@ export default function ArrivalByTimeChart({
bottom: 5,
}}>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="gtfs_route_date" reversed={true} />
<XAxis dataKey="gtfs_route_date" />
<YAxis />
<Tooltip
content={({ payload }) =>
Expand Down

0 comments on commit c91fdec

Please sign in to comment.