| Summary: | BPS38 - New Donut Chart Type | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | David Michonneau <dmichonneau> |
| Component: | BIRT | Assignee: | Hank Christensen <hchristensen> |
| Status: | VERIFIED FIXED | QA Contact: | Maggie Shen <lshen> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | bluesoldier, costantino.sertorio, karsten.knese, kkazmierczyk+eclipse, Lionel.wyl, wenfeng.fwd |
| Version: | 2.2.0 | Keywords: | helpwanted, plan |
| Target Milestone: | 4.2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
David Michonneau
I'm a student for this year Google Summer of Code. My project title is: "adding new chart types in BIRT". So I'm going to implement the donut chart. Have a look at eclipse wiki: http://wiki.eclipse.org/Adding_new_advanced_chart_types_in_BIRT I was implementing the donut chart. During writing code I was implementing a few calculations for the donut the same way the existing pie chart does. Now I want to start a little discussion about code design here: I think it's not necessary to duplicate code for two chart types. I would edit the pie chart in a way a user has the chance to select a pie/donut chart either as pie with a "whole" in the middle or not. So the user has the possibility to select the inner radius. If it's 0, a pie chart will be rendered. Are there any thoughts about this idea to implement just one chart type instead of two ? I agree that from a developer standpoint, pie and donut charts are very similar. However, from a user perspective, these are different chart types. One thing to consider is the issue of discoverability. For example, if a report designer is doing a feature analysis of the BIRT charting package, there are likely to take note of the various chart types offered. They are much less likely to see that the pie chart contains an option of putting a hole in the middle of it. Another thing to consider is default settings/rendering. We probably want to provide a default hole size for donut charts. We can't do this if it is an option on a pie chart. In addition, the rendering of a donut chart will probably be different than simply a pie with a hole in the middle. For example, we'll probably want some rounded edges, and possibly some other rendering changes to differentiate this type. From a coding standpoint - you are correct. Donut charts will share much of their code with pie charts. We don't want to copy code. It might work well to make the donut series a subclass of the pie series, so that it can reuse much of pie's code, but register it as a separate chart type. We have decided to implement the donut chart by adding an inner radius property to the pie chart type. This is the quickest solution, and will enable report developers to control the inner radius of the donut based on value or percentage. verified. 4.2.0.v20120605-1006 |