Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix point colors and consolidate radii #701

Merged
merged 1 commit into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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