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

Horizontal Line Threshold #380

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
62a6cdd
:tada: Added a new hook and use that hook to be able to add an axis r…
kunkoala Sep 16, 2024
3eecb4a
:wrench: Refactor LineChart component to use horizontalYAxisThreshold…
kunkoala Sep 17, 2024
8d0c165
:tada: Added settings button to lineChartContainer, now horizontalYAx…
kunkoala Sep 17, 2024
5b2fbd3
:tada: added a new hook for creating series range, and use it with us…
kunkoala Sep 18, 2024
4e56f95
:wrench: :hammer: make a seriesRangeSettings to use for the series ra…
kunkoala Sep 27, 2024
6a469f4
:wrench: :hammer: Update LineChartSettings to use selected district a…
kunkoala Sep 27, 2024
4be3f67
:wrench: small code refactors
kunkoala Sep 27, 2024
df75997
:sparkles: Fixed formatting issues
kunkoala Sep 27, 2024
b775110
:sparkles: added license
kunkoala Sep 30, 2024
0b1e1e8
:wrench: :hammer: refactored district data type and use it on differe…
kunkoala Sep 30, 2024
7f5a751
:wrench: edited some functions for horizontal threshold slice in User…
kunkoala Sep 30, 2024
ef94f5d
:tada: :wrench: :hammer: refactored some file structures, added line …
kunkoala Oct 7, 2024
d7ac19c
:wrench: :sparkles: added some error handlings and for adding a new t…
kunkoala Oct 7, 2024
3431d24
:wrench: Set horizontal thresholds in store
kunkoala Oct 7, 2024
16be2a5
:sparkles: add license to type
kunkoala Oct 7, 2024
3794379
:wrench: refactor some state names to adhere to naming conventions
kunkoala Oct 8, 2024
da16f93
:wrench: :tada: added a useEffect to change the selected map area whe…
kunkoala Oct 8, 2024
2b2e7f4
:tada: :hammer: refactor HorizontalThresholdList into HorizontalThres…
kunkoala Oct 8, 2024
6575e17
:wrench: added some conditionals to prevent unnecessary re-renders
kunkoala Oct 8, 2024
12f9319
:wrench: :hammer: :tada: :sparkle: distinct styling for selected thre…
kunkoala Oct 8, 2024
0565529
:wrench: useEffect dependencies
kunkoala Oct 8, 2024
71564d3
:wrench: use useRef for selected area and update the compartments to …
kunkoala Oct 10, 2024
1f4792d
:wrench: :hammer: use MUI Table for the threshold list
kunkoala Oct 11, 2024
24113b1
:heavy_check_mark: add new userPreferenceSlice test to include threshold
kunkoala Oct 15, 2024
b9ff42d
:hammer: :sparkle: refactored horizontal threshold components, added …
kunkoala Oct 18, 2024
855c213
:wrench: improved UX by disabling clicking other items when user is e…
kunkoala Oct 22, 2024
d56b863
:heavy_check_mark: created tests for HorizontalThreshold components a…
kunkoala Oct 22, 2024
5cf7656
:wrench: :beetle: fixed import statement case for FilterValue in Data…
kunkoala Oct 22, 2024
5866381
:wrench: :sparkles: :green_heart: added missing reuse compliance
kunkoala Oct 22, 2024
674bd5a
:wrench: :beetle: small refactor and bug fix
kunkoala Oct 29, 2024
42a8b76
:tada: :wrench: added localization for settings menu and horizontal t…
kunkoala Oct 29, 2024
e3b5c60
:green_heart: fix license
kunkoala Oct 30, 2024
92c18e3
:green_heart: :heavy_check_mark: fix lineChartSettings test
kunkoala Nov 21, 2024
5304930
:tada: added alternating stroke color to distinguish values above thr…
kunkoala Dec 10, 2024
4d1a03c
:wrench: :beetle: better seriesRange cleanup and fixed stroke not app…
kunkoala Dec 10, 2024
39416c3
:tada: :wrench: edited opacity code, unfinished
kunkoala Dec 17, 2024
981746c
:tada: opacity formula works for overlaps, doesn't work if series doe…
kunkoala Feb 5, 2025
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
Prev Previous commit
Next Next commit
🔧 Set horizontal thresholds in store
kunkoala committed Oct 7, 2024
commit 3431d24e2831f170bc0039444ff4070fc53ba29c
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ import {useTranslation} from 'react-i18next';
import {LineChartSettings} from './LineChartSettingsComponents/LineChartSettings';
import {Dictionary} from 'util/util';
import {HorizontalThreshold} from 'types/horizontalThreshold';
import {setHorizontalYAxisThresholds} from 'store/UserPreferenceSlice';

export default function LineChartContainer() {
const {t} = useTranslation('backend');
@@ -38,6 +39,11 @@ export default function LineChartContainer() {
return t(`infection-states.${selectedCompartment}`);
}, [selectedCompartment, t]);

// Set horizontal thresholds in store
useEffect(() => {
dispatch(setHorizontalYAxisThresholds(horizontalThresholds));
}, [horizontalThresholds, dispatch]);

// Set selected date in store
useEffect(() => {
dispatch(selectDate(selectedDate));