-
Notifications
You must be signed in to change notification settings - Fork 10
Add pie chart visualization template #595
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
Open
skaphan
wants to merge
24
commits into
artoonie:main
Choose a base branch
from
skaphan:pie-template-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d4595c4
Gitignore scripts/reset-db.sh to keep it local-only
skaphan 08b3f69
Add pie chart visualization template
skaphan edbd5fe
Use election color theme for pie chart instead of hardcoded colors
skaphan 10b2d0e
Build pie chart data from processed Graph instead of raw JSON
skaphan 48c4e8c
Pass config options to pie chart, initialize to final round
skaphan 0df774d
Add hidePie setting to hide pie chart tab per election
skaphan 3a97020
Add tests for graphToRCtab converter (32 tests)
skaphan 1b9f289
Rebuild standalone component with tooltip fix
skaphan ad3876b
Scramble pie chart colors for better adjacent-slice contrast
skaphan cd5e09b
Interleave pie slices by vote count, fix color count
skaphan 1cf43d1
Fix interleave: compute order once from round 1, reuse for all rounds
skaphan c3e6345
Add pie chart and special character tests
skaphan fc144ae
Update pie chart: per-round percentages, phase-labeled button
skaphan c9b41ed
Update pie chart: fix centering, tooltip positioning, remove bubble c…
skaphan 9b03f5f
Fix CLS: reserve pie chart dimensions before JS loads
skaphan a648b2e
Update pie chart: shadow outline pie, slice separators
skaphan d58fd41
Update pie chart bundle: defer elected slice splitting
skaphan 34186e0
Update pie chart bundle: donut shrink follows moving slices
skaphan f6e3de8
Address PR review feedback
skaphan 95bcdf1
Update pie chart: fix ghost slices, button size
skaphan 49e52dd
Clear stroke on zero-width slices
skaphan 8aa7d3e
Add phase stepper for pie chart animation
skaphan a030695
Disable stepper on last round
skaphan b91ca14
Fix off-by-one in stepper disabled/label check
skaphan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -192,6 +192,15 @@ | |
| } | ||
| } | ||
|
|
||
|
|
||
| def pie_chart_no_cache(headers, path, url): | ||
| """In development, ensure browsers revalidate the pie chart component on every load.""" | ||
| if DEBUG and url.endswith('pie-chart.es.js'): | ||
| headers['Cache-Control'] = 'no-cache' | ||
|
|
||
|
|
||
| WHITENOISE_ADD_HEADERS_FUNCTION = pie_chart_no_cache | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this needed or was this just for testing? |
||
|
|
||
| NODE_PACKAGE_JSON = './package.json' | ||
| NODE_MODULES_ROOT = './node_modules' | ||
| NODE_PACKAGE_MANAGER_EXECUTABLE = os.environ.get('NODE_PACKAGE_MANAGER_EXECUTABLE', '/usr/bin/npm') | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are both of these needed? Wouldn't one or the other be sufficient?