Skip to content

Commit

Permalink
fix point colors and consolidate radii
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickCleary committed Jun 24, 2023
1 parent b224954 commit 658f588
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
3 changes: 1 addition & 2 deletions modules/landing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ const getDatasetOptions = (line: Line) => {
return {
borderColor: LINE_COLORS[line ?? 'default'],
borderWidth: 6,
pointBackgroundColor: 'transparent',
pointBorderWidth: 0,
tension: 0.5,
pointHoverRadius: 8,
pointHoverRadius: 6,
spanGaps: false,
pointHoverBackgroundColor: LINE_COLORS[line ?? 'default'],
};
Expand Down
5 changes: 2 additions & 3 deletions modules/ridership/RidershipGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ export const RidershipGraph: React.FC<RidershipGraphProps> = ({
label: `Riders`,
borderColor: lineColor,
backgroundColor: hexWithAlpha(lineColor, 0.8),
pointRadius: 8,
pointBackgroundColor: 'transparent',
pointRadius: 0,
pointBorderWidth: 0,
fill: true,
pointHoverRadius: 3,
pointHoverRadius: 6,
pointHoverBackgroundColor: lineColor,
data: data.map((datapoint) => datapoint.count),
},
Expand Down
5 changes: 2 additions & 3 deletions modules/service/PercentageServiceGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ export const PercentageServiceGraph: React.FC<PercentageServiceGraphProps> = ({
{
label: `% of ${comparison}`,
borderColor: lineColor,
pointRadius: 8,
pointBackgroundColor: 'transparent',
pointRadius: 0,
pointHoverRadius: 6,
pointBorderWidth: 0,
stepped: true,
fill: true,
pointHoverRadius: 3,
pointHoverBackgroundColor: lineColor,
backgroundColor: hexWithAlpha(lineColor, 0.8),
data: compareToScheduled ? calculatedData.scheduled : calculatedData.baseline,
Expand Down
9 changes: 5 additions & 4 deletions modules/service/ServiceGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
label: `Actual trips`,
borderColor: lineColor,
backgroundColor: hexWithAlpha(lineColor, 0.8),
pointRadius: 8,
pointBackgroundColor: 'transparent',
pointRadius: 0,
pointBorderWidth: 0,
stepped: true,
fill: true,
pointHoverRadius: 3,
pointHoverRadius: 6,
pointHoverBackgroundColor: lineColor,
data: data.map((datapoint) =>
datapoint.value ? datapoint.count / 2 : Number.NaN
Expand All @@ -76,8 +75,10 @@ export const ServiceGraph: React.FC<ServiceGraphProps> = ({
label: `MBTA scheduled trips`,
stepped: true,
fill: true,
pointBackgroundColor: 'transparent',
pointBorderWidth: 0,
pointRadius: 0,
pointHoverRadius: 6,

borderColor: lineColor,
spanGaps: false,
data: predictedData.counts.map((count, index) =>
Expand Down
5 changes: 2 additions & 3 deletions modules/speed/SpeedGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ export const SpeedGraph: React.FC<SpeedGraphProps> = ({
{
label: `MPH`,
borderColor: LINE_COLORS[line ?? 'default'],
pointRadius: 8,
pointBackgroundColor: 'transparent',
pointRadius: 0,
pointBorderWidth: 0,
stepped: true,
pointHoverRadius: 3,
pointHoverRadius: 6,
spanGaps: false,
pointHoverBackgroundColor: LINE_COLORS[line ?? 'default'],
data: data.map((datapoint) =>
Expand Down

0 comments on commit 658f588

Please sign in to comment.