-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from visdesignlab/default-grammar-config
Add Horziontal grammar flag, refactor defaultConfig
- Loading branch information
Showing
9 changed files
with
54 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,10 @@ | ||
import { UpsetConfig } from '@visdesignlab/upset2-core'; | ||
import { UpsetConfig, DefaultConfig } from '@visdesignlab/upset2-core'; | ||
import { atom } from 'recoil'; | ||
|
||
export const defaultConfig: UpsetConfig = { | ||
plotInformation: { | ||
description: '', | ||
sets: '', | ||
items: '', | ||
}, | ||
firstAggregateBy: 'None', | ||
firstOverlapDegree: 2, | ||
secondAggregateBy: 'None', | ||
secondOverlapDegree: 2, | ||
sortVisibleBy: 'Alphabetical', | ||
sortBy: 'Size', | ||
sortByOrder: 'Descending', | ||
filters: { | ||
maxVisible: 3, | ||
minVisible: 0, | ||
hideEmpty: true, | ||
hideNoSet: false, | ||
}, | ||
visibleSets: [], | ||
visibleAttributes: [], | ||
bookmarkedIntersections: [], | ||
collapsed: [], | ||
plots: { | ||
scatterplots: [], | ||
histograms: [], | ||
wordClouds: [], | ||
}, | ||
allSets: [], | ||
}; | ||
// fields can be edited here to stray from default config | ||
const config = { ...DefaultConfig }; | ||
|
||
export const upsetConfigAtom = atom<UpsetConfig>({ | ||
key: 'app-config', | ||
default: defaultConfig, | ||
default: config, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { UpsetConfig } from './types'; | ||
|
||
export const DefaultConfig: UpsetConfig = { | ||
plotInformation: { | ||
description: '', | ||
sets: '', | ||
items: '', | ||
}, | ||
horizontal: false, | ||
firstAggregateBy: 'None', | ||
firstOverlapDegree: 2, | ||
secondAggregateBy: 'None', | ||
secondOverlapDegree: 2, | ||
sortVisibleBy: 'Alphabetical', | ||
sortBy: 'Size', | ||
sortByOrder: 'Descending', | ||
filters: { | ||
maxVisible: 6, | ||
minVisible: 0, | ||
hideEmpty: true, | ||
hideNoSet: false, | ||
}, | ||
visibleSets: [], | ||
visibleAttributes: [], | ||
bookmarkedIntersections: [], | ||
collapsed: [], | ||
plots: { | ||
scatterplots: [], | ||
histograms: [], | ||
wordClouds: [], | ||
}, | ||
allSets: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,8 @@ | ||
import { UpsetConfig } from '@visdesignlab/upset2-core'; | ||
import { UpsetConfig, DefaultConfig } from '@visdesignlab/upset2-core'; | ||
import { atom } from 'recoil'; | ||
|
||
// This config is overruled by any config provided by an external source | ||
export const defaultConfig: UpsetConfig = { | ||
plotInformation: { | ||
description: '', | ||
sets: '', | ||
items: '', | ||
}, | ||
firstAggregateBy: 'None', | ||
firstOverlapDegree: 2, | ||
secondAggregateBy: 'None', | ||
secondOverlapDegree: 2, | ||
sortVisibleBy: 'Alphabetical', | ||
sortBy: 'Size', | ||
sortByOrder: 'Descending', | ||
filters: { | ||
maxVisible: 3, | ||
minVisible: 0, | ||
hideEmpty: true, | ||
hideNoSet: false, | ||
}, | ||
visibleSets: [], | ||
visibleAttributes: [], | ||
bookmarkedIntersections: [], | ||
collapsed: [], | ||
plots: { | ||
scatterplots: [], | ||
histograms: [], | ||
wordClouds: [], | ||
}, | ||
allSets: [], | ||
}; | ||
|
||
export const upsetConfigAtom = atom<UpsetConfig>({ | ||
key: 'upset-config', | ||
default: defaultConfig, | ||
default: DefaultConfig, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { UpsetConfig } from '@visdesignlab/upset2-core'; | ||
import { UpsetConfig, DefaultConfig } from '@visdesignlab/upset2-core'; | ||
import { atom } from 'recoil'; | ||
|
||
import { defaultConfig } from './config/upsetConfigAtoms'; | ||
|
||
export const stateAtom = atom<UpsetConfig>({ | ||
key: 'upset-state', | ||
default: defaultConfig, | ||
default: DefaultConfig, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters