Skip to content

Commit

Permalink
Update traffic stop colors and contraband table modal wording (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
Afani97 authored Jan 31, 2024
1 parent 7c29a8e commit bdedd1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions frontend/src/Components/Charts/Contraband/Contraband.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ function Contraband(props) {
fill: false,
backgroundColor: colors[ds.stop_purpose],
borderColor: colors[ds.stop_purpose],
hoverBackgroundColor: colors[ds.stop_purpose],
borderWidth: 1,
}));
const data = {
Expand Down Expand Up @@ -573,7 +572,7 @@ function Contraband(props) {
</S.ChartDescription>
<NewModal
tableHeader='Contraband "Hit Rate" Grouped By Stop Purpose'
tableSubheader="Shows what percentage of searches led to the discovery of illegal items broken down by race/ethnicity and original stop purpose."
tableSubheader="Shows what number of searches led to the discovery of illegal items by race/ethnicity and original stop purpose."
agencyName={chartState.data[AGENCY_DETAILS].name}
tableData={contrabandStopPurposeModalData.tableData}
csvData={contrabandStopPurposeModalData.csvData}
Expand Down Expand Up @@ -602,7 +601,7 @@ function Contraband(props) {
modalConfig={{
tableHeader: 'Contraband "Hit Rate" Grouped By Stop Purpose',
tableSubheader: getBarChartModalSubHeading(
'Shows what percentage of searches led to the discovery of illegal items broken down by race/ethnicity and original stop purpose'
'Shows what number of searches led to the discovery of illegal items by race/ethnicity and original stop purpose'
),
agencyName: chartState.data[AGENCY_DETAILS].name,
chartTitle: getBarChartModalHeading(
Expand Down Expand Up @@ -632,7 +631,7 @@ function Contraband(props) {
<P>Shows what percentage of searches discovered specific types of illegal items.</P>
<NewModal
tableHeader='Contraband "Hit Rate" by type'
tableSubheader="Shows what percentage of searches discovered specific types of illegal items."
tableSubheader="Shows what number of searches discovered specific types of illegal items."
agencyName={chartState.data[AGENCY_DETAILS].name}
tableData={contrabandTypesData.tableData}
csvData={contrabandTypesData.csvData}
Expand All @@ -652,7 +651,7 @@ function Contraband(props) {
modalConfig={{
tableHeader: 'Contraband "Hit Rate" by type',
tableSubheader: getBarChartModalSubHeading(
'Shows what percentage of searches discovered specific types of illegal items'
'Shows what number of searches discovered specific types of illegal items'
),
agencyName: chartState.data[AGENCY_DETAILS].name,
chartTitle: getBarChartModalHeading(
Expand Down
12 changes: 6 additions & 6 deletions nc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,20 +607,20 @@ def get(self, request, agency_id):
{
"label": StopPurposeGroup.SAFETY_VIOLATION,
"data": self.get_values(df, StopPurposeGroup.SAFETY_VIOLATION, years_len),
"borderColor": "#7F428A",
"backgroundColor": "#CFA9D6",
"borderColor": "#5F0F40",
"backgroundColor": "#5F0F40",
},
{
"label": StopPurposeGroup.REGULATORY_EQUIPMENT,
"data": self.get_values(df, StopPurposeGroup.REGULATORY_EQUIPMENT, years_len),
"borderColor": "#b36800",
"backgroundColor": "#ffa500",
"borderColor": "#E36414",
"backgroundColor": "#E36414",
},
{
"label": StopPurposeGroup.OTHER,
"data": self.get_values(df, StopPurposeGroup.OTHER, years_len),
"borderColor": "#1B4D3E",
"backgroundColor": "#ACE1AF",
"borderColor": "#0F4C5C",
"backgroundColor": "#0F4C5C",
},
],
}
Expand Down

0 comments on commit bdedd1f

Please sign in to comment.