Skip to content

Commit

Permalink
Update App.svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
ylesia-wu committed Feb 21, 2024
1 parent 7b98b91 commit 9e007b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
avgValue = 30.69;
} else if ((selectedData === notDistracted) | (selectedData === notDistractedSorted)) {
currentData = notDistractedSorted;
y_label = 'Drivers Involved In Fatal Collisions Who Were Not Distracte (%)';
subtitle = 'Drivers Involved In Fatal Collisions Who Were Not Distracte (%) in 50 US States';
y_label = 'Drivers Involved In Fatal Collisions Who Were Not Distracted (%)';
subtitle = 'Drivers Involved In Fatal Collisions Who Were Not Distracted (%) in 50 US States';
avgValue = 85.92;
} else if ((selectedData === noPrevious) | (selectedData === noPreviousSorted)) {
currentData = noPreviousSorted;
Expand Down Expand Up @@ -145,8 +145,8 @@
avgValue = 30.69;
} else if ((selectedData === notDistracted) | (selectedData === notDistractedSorted)) {
currentData = notDistracted;
y_label = 'Drivers Involved In Fatal Collisions Who Were Not Distracte (%)';
subtitle = 'Drivers Involved In Fatal Collisions Who Were Not Distracte (%) in 50 US States';
y_label = 'Drivers Involved In Fatal Collisions Who Were Not Distracted (%)';
subtitle = 'Drivers Involved In Fatal Collisions Who Were Not Distracted (%) in 50 US States';
avgValue = 85.92;
} else if ((selectedData === noPrevious) | (selectedData === noPreviousSorted)) {
currentData = noPrevious;
Expand Down Expand Up @@ -222,7 +222,7 @@
<!-- Draw a line for the average -->
<line x1="{margin.left}" y1="{yScale(avgValue)}" x2="{width - margin.right - 15}" y2="{yScale(avgValue)}" stroke="red" stroke-width="2" />
<!-- Add a label for the average -->
<text x="{width - margin.right - 7}" y="{yScale(avgValue)}" font-size="12" fill="red">Average: {avgValue}</text>
<text x="{width - margin.right - 7}" y="{yScale(avgValue)}" font-size="12" fill="red">Average:</text>
<text x="{width - margin.right - 7}" y="{yScale(avgValue) + 15}" font-size="12" fill="red">{avgValue}</text>
</g>

Expand Down

0 comments on commit 9e007b7

Please sign in to comment.