- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Feature: Add StackedPieChart #2004
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
base: main
Are you sure you want to change the base?
Conversation
378932b    to
    6a9aec1      
    Compare
  
    d04f72f    to
    2ecef63      
    Compare
  
    Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
Signed-off-by: Jonas Klock <jonas.klock@exxeta.com>
2ecef63    to
    b88f01f      
    Compare
  
    | Codecov Report❌ Patch coverage is  Additional details and impacted files@@             Coverage Diff             @@
##             main    #2004       +/-   ##
===========================================
- Coverage   92.49%   81.97%   -10.53%     
===========================================
  Files          50       55        +5     
  Lines        3731     4210      +479     
===========================================
  Hits         3451     3451               
- Misses        280      759      +479     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| Hi, thanks for your contribution. Just like what I did for the stacked bar chart here: #112 Please let me know your thoughts on it. | 
| Hi, yeah thank you for responding! I wanted to hear your opinion about that. I'll implement analogous to #112 and add tests :) | 
| I appreciate it! | 
As described in #2003 a "Stacked Pie Chart" was requested. This Pull Request aims to add this feature.
Solution
The Implementation of [StackedPieChart] is very similar to [PieChart]. The biggest difference is drawing a Section with multiple Segments.
The radius of a segment is calculated like this:
SegmentRadius = SectionRadius * SegmentValue / TotalSectionValues
The sweep angles are then calculated like in [PieChart]
Todo's and Improvements