Skip to content

Commit

Permalink
feat: chart options in url
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Dec 10, 2024
1 parent 970c02f commit 5f34423
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/app/services/url-state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,25 @@ export class UrlStateService {
loader: this.loadDispOverview
},
{

name: 'isPriorityEnabled',
source: this.mapService.priorityEnabled$.pipe(
map(isPriorityEnabled => ({isPriorityEnabled})),
),
loader: this.loadDispPriority
},
{
name: 'isShowLinesEnabled',
source: this.store$.select(chartsStore.getShowLines).pipe(
map(isShowLinesEnabled => ({isShowLinesEnabled})),
),
loader: this.loadDispShowLines
},
{
name: 'isLinearFitEnabled',
source: this.store$.select(chartsStore.getShowLinearFit).pipe(
map(isLinearFitEnabled => ({isLinearFitEnabled})),
),
loader: this.loadDispShowLinearFit
}
]
}
Expand Down Expand Up @@ -997,4 +1010,20 @@ export class UrlStateService {
}
return;
}
private loadDispShowLines = (isShowLinesEnabled) => {
if(isShowLinesEnabled === 'true') {
this.store$.dispatch(chartsStore.showGraphLines())
} else {
this.store$.dispatch(chartsStore.hideGraphLines())
}
return;
}
private loadDispShowLinearFit = (isLinearFitEnabled) => {
if(isLinearFitEnabled === 'true') {
this.store$.dispatch(chartsStore.showLinearFit())
} else {
this.store$.dispatch(chartsStore.hideLinearFit())
}
return;
}
}

0 comments on commit 5f34423

Please sign in to comment.