Skip to content

Commit

Permalink
Tweaks to chart format and colors
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-weinberg committed Aug 20, 2023
1 parent 284a3d1 commit 0077cf1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Steps to reproduce the behavior:
**Device Info (please complete the following information):**
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS, Windows]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]
- Browser: [e.g. Chrome, Safari]
- Browser Version: [e.g. 22]

**Additional context**
<!-- Add any other context about the problem here. -->
1 change: 1 addition & 0 deletions .github/workflows/healthcheck.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: healthcheck

on:
workflow_dispatch:
schedule:
- cron: '15 23 * * *' # 7:15PM EST every day

Expand Down
4 changes: 2 additions & 2 deletions modules/ridership/RidershipGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ 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']})`,
label: `Historical Maximum (${PEAK_RIDERSHIP[routeIndex ?? 'DEFAULT'].toLocaleString("en-us")} riders)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand Down Expand Up @@ -139,7 +139,7 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({
},
title: {
display: true,
text: 'Trips',
text: 'Riders',
color: COLORS.design.subtitleGrey,
},
},
Expand Down
9 changes: 4 additions & 5 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})`,
label: `Historical Maximum (${peak.toLocaleString("en-us")} trips)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand All @@ -115,9 +115,8 @@ 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 Expand Up @@ -157,7 +156,7 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
},
title: {
display: true,
text: 'trips',
text: 'Trips',
color: COLORS.design.subtitleGrey,
},
},
Expand Down
3 changes: 2 additions & 1 deletion modules/speed/SpeedGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const SpeedGraph: React.FC<SpeedGraphProps> = ({
datasets: [
{
label: `MPH`,
backgroundColor: COLORS.design.background,
borderColor: LINE_COLORS[line ?? 'default'],
pointRadius: 0,
pointBorderWidth: 0,
Expand All @@ -67,7 +68,7 @@ export const SpeedGraph: React.FC<SpeedGraphProps> = ({
},
{
// This null dataset produces the entry in the legend for the baseline annotation.
label: `Historical Maximum (${peak})`,
label: `Historical Maximum (${peak} mph)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand Down

0 comments on commit 0077cf1

Please sign in to comment.