Skip to content

Commit

Permalink
Merge pull request #211 from caktus/dropdown-description-tooltips
Browse files Browse the repository at this point in the history
Updated the label on the second new Traffic Stops by Stop Purpose and…
  • Loading branch information
janelle-caktus authored Jul 24, 2023
2 parents b8ddaab + 11b8258 commit 414e840
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/Components/Charts/TrafficStops/TrafficStops.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import range from 'lodash.range';
import LineChart from '../../NewCharts/LineChart';
import axios from '../../../Services/Axios';
import NewModal from '../../NewCharts/NewModal';
import displayDefinition from '../../../util/displayDefinition';

function TrafficStops(props) {
const { agencyId } = props;
Expand Down Expand Up @@ -493,6 +494,11 @@ function TrafficStops(props) {
onChange={handleStopPurposeSelect}
options={[PURPOSE_DEFAULT].concat(stopTypes)}
/>

{purpose !== PURPOSE_DEFAULT && (
<p style={{ marginTop: '10px' }}>{displayDefinition(purpose)}</p>
)}

<MonthRangePicker
agencyId={agencyId}
dataSet={purpose !== PURPOSE_DEFAULT ? STOPS_BY_REASON : STOPS}
Expand Down Expand Up @@ -585,7 +591,7 @@ function TrafficStops(props) {
<GroupedStopsContainer>
<LineChart
data={stopsGroupedByPurposeData.regulatory}
title="Regulatory Equipment"
title="Regulatory/Equipment"
maintainAspectRatio={false}
displayLegend={false}
yAxisMax={stopsGroupedByPurposeData.max_step_size}
Expand Down
20 changes: 20 additions & 0 deletions frontend/src/util/displayDefinition.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 414e840

Please sign in to comment.