Skip to content

Commit

Permalink
Changes based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-weinberg committed Aug 20, 2023
1 parent 2c87835 commit e1db130
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions common/types/basicWidgets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class PercentageWidgetValue extends BaseWidgetValue implements WidgetValu

export class TripsWidgetValue extends BaseWidgetValue implements WidgetValueInterface {
getUnits() {
return 'Trips';
return 'Round Trips';
}

getFormattedValue(isLarge?: boolean) {
Expand Down Expand Up @@ -188,7 +188,7 @@ export class MPHWidgetValue extends BaseWidgetValue implements WidgetValueInterf

export class RidersWidgetValue extends BaseWidgetValue implements WidgetValueInterface {
getUnits() {
return 'Riders';
return 'Fare Validations';
}

getFormattedValue(isLarge?: boolean) {
Expand Down
8 changes: 4 additions & 4 deletions modules/ridership/RidershipGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({
labels,
datasets: [
{
label: `Riders`,
label: `Fare Validations`,
borderColor: lineColor,
backgroundColor: hexWithAlpha(lineColor, 0.8),
pointRadius: 0,
Expand All @@ -73,7 +73,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'
].toLocaleString('en-us')} riders)`,
].toLocaleString('en-us')} fare validations)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand All @@ -99,7 +99,7 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({
callbacks: {
...callbacks,
label: (context) => {
return `${context.parsed.y} (${(
return `${context.parsed.y.toLocaleString('en-us')} (${(
(100 * context.parsed.y) /
PEAK_RIDERSHIP[routeIndex ?? 'DEFAULT']
).toFixed(1)}% of historical maximum)`;
Expand Down Expand Up @@ -141,7 +141,7 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({
},
title: {
display: true,
text: 'Riders',
text: 'Fare Validations',
color: COLORS.design.subtitleGrey,
},
},
Expand Down
6 changes: 3 additions & 3 deletions modules/service/ServiceGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
),
},
{
label: `MBTA scheduled trips`,
label: `Scheduled round trips`,
stepped: true,
fill: true,
pointBorderWidth: 0,
Expand All @@ -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')} round trips)`,
backgroundColor: CHART_COLORS.ANNOTATIONS,
data: null,
},
Expand Down Expand Up @@ -157,7 +157,7 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
},
title: {
display: true,
text: 'Trips',
text: 'Round Trips',
color: COLORS.design.subtitleGrey,
},
},
Expand Down

0 comments on commit e1db130

Please sign in to comment.