-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pie title #2987
Merged
Merged
Pie title #2987
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4676fd8
Add an optional title to pie charts.
codrut3 79b00ab
Merge branch 'master' into pie_title
codrut3 ed86959
Add more options to titleposition.
codrut3 96e3afd
Merge branch 'master' into pie_title
codrut3 97cc9bb
Remove default option for titleposition.
codrut3 bce5add
Merge branch 'master' into pie_title
codrut3 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,83 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"values": [118, 107, 98, 90, 87], | ||
"labels": ["1st", "2nd", "3rd", "4th", "5th"], | ||
"type": "pie", | ||
"name": "Starry Night", | ||
"marker": { | ||
"colors": ["rgb(56, 75, 126)", "rgb(18, 36, 37)", "rgb(34, 53, 101)", "rgb(36, 55, 57)", "rgb(6, 4, 4)"] | ||
}, | ||
"domain": { | ||
"x": [0, 0.48], | ||
"y": [0, 0.49] | ||
}, | ||
"textinfo": "none", | ||
"title": "Starry Night", | ||
"titleposition": "bottom center", | ||
"scalegroup": "1" | ||
}, | ||
{ | ||
"values": [28, 26, 21, 15, 10], | ||
"labels": ["1st", "2nd", "3rd", "4th", "5th"], | ||
"type": "pie", | ||
"name": "Sunflowers", | ||
"marker": { | ||
"colors": ["rgb(177, 127, 38)", "rgb(205, 152, 36)", "rgb(99, 79, 37)", "rgb(129, 180, 179)", "rgb(124, 103, 37)"] | ||
}, | ||
"domain": { | ||
"x": [0.52, 1], | ||
"y": [0, 0.49] | ||
}, | ||
"textinfo": "none", | ||
"title": "Sunflowers", | ||
"titleposition": "top center", | ||
"titlefont": { | ||
"size": 12 | ||
}, | ||
"scalegroup": "2" | ||
}, | ||
{ | ||
"values": [108, 109, 96, 84, 73], | ||
"labels": ["1st", "2nd", "3rd", "4th", "5th"], | ||
"type": "pie", | ||
"name": "Irises", | ||
"marker": { | ||
"colors": ["rgb(33, 75, 99)", "rgb(79, 129, 102)", "rgb(151, 179, 100)", "rgb(175, 49, 35)", "rgb(36, 73, 147)"] | ||
}, | ||
"domain": { | ||
"x": [0, 0.48], | ||
"y": [0.51, 1] | ||
}, | ||
"textinfo": "none", | ||
"title": "Irises", | ||
"titlefont": { | ||
"size": 12 | ||
}, | ||
"scalegroup": "2" | ||
}, | ||
{ | ||
"values": [31, 24, 19, 18, 8], | ||
"labels": ["1st", "2nd", "3rd", "4th", "5th"], | ||
"type": "pie", | ||
"name": "The Night Cafe", | ||
"titlefont": { | ||
"size": 50 | ||
}, | ||
"marker": { | ||
"colors": ["rgb(146, 123, 21)", "rgb(177, 180, 34)", "rgb(206, 206, 40)", "rgb(175, 51, 21)", "rgb(35, 36, 21)"] | ||
}, | ||
"domain": { | ||
"x": [0.52, 1], | ||
"y": [0.52, 1] | ||
}, | ||
"textinfo": "none", | ||
"title": "The<br>Night<br>Cafe", | ||
"scalegroup": "1" | ||
} | ||
], | ||
"layout": { | ||
"height": 400, | ||
"width": 500 | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"values": [955, 405, 360, 310, 295], | ||
"labels": ["Mandarin", "Spanish", "English", "Hindi", "Arabic"], | ||
"textinfo": "label+percent", | ||
"hole": 0.4, | ||
"title": "Number<br>of<br>speakers", | ||
"titleposition": "middle center", | ||
"type": "pie" | ||
} | ||
], | ||
"layout": { | ||
"title": "Top 5 languages by number of native speakers (2010, est.)", | ||
"height": 600, | ||
"width": 600 | ||
} | ||
} |
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.
I still think we should make the default be
'middle center'
when there's ahole
(ievar titlePosition = coerce('titleposition', hole ? 'middle center' : 'top center');
and removeattributes.titleposition.dflt
) - or maybe whenhole > 0.5
or something... would be strange to put the title in the center when the hole is very small!But I'm not wedded to that idea; if you've considered it and still think
'top center'
should be the default in all cases we can keep it that way.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.
Done.