Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-weinberg committed Aug 16, 2023
1 parent b305abc commit 23e56dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion modules/ridership/RidershipGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({

{
// This null dataset produces the entry in the legend for the peak annotation.
label: `Historical Maximum (${PEAK_RIDERSHIP[routeIndex ?? 'DEFAULT'].toLocaleString("en-us")} riders)`,
label: `Historical Maximum (${PEAK_RIDERSHIP[
routeIndex ?? 'DEFAULT'
].toLocaleString('en-us')} riders)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand Down
7 changes: 4 additions & 3 deletions modules/service/ServiceGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
},
{
// This null dataset produces the entry in the legend for the baseline annotation.
label: `Historical Maximum (${peak.toLocaleString("en-us")} trips)`,
label: `Historical Maximum (${peak.toLocaleString('en-us')} trips)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand All @@ -115,8 +115,9 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
callbacks: {
...callbacks,
label: (context) => {
return `${context.datasetIndex === 0 ? 'Actual:' : 'Scheduled:'} ${context.parsed.y
} (${((100 * context.parsed.y) / peak).toFixed(1)}% of historical maximum)`;
return `${context.datasetIndex === 0 ? 'Actual:' : 'Scheduled:'} ${
context.parsed.y
} (${((100 * context.parsed.y) / peak).toFixed(1)}% of historical maximum)`;
},
},
},
Expand Down

0 comments on commit 23e56dc

Please sign in to comment.