Apache OpenOffice (AOO) Bugzilla – Issue 16776
starting angle for pie charts - rotation of pie charts
Last modified: 2013-02-24 21:22:33 UTC
The default starting point for the first slice in a 2D pie chart is "due North" and for a 3D pie chart is "due East". It would be nice to give an option in the Chart Wizard to permit a different starting point orientation. Due East would be 0 degrees, due North 90 degrees, etc., and the slices arranged in counterclockwise order (as now). This would be helpful in a case such as if you had pie slices of greatly unequal size, and wished to make a 3D chart rotated around with the smaller slices directly in front. Or, you might have a mixture of 2D and 3D pie charts and want to make them consistent in where they start.
adjusing component to chart
HI Bettina, one for you. tk
Hi Bettina, one for you. tk
Note that the recent versions of Excel give the ability for the user to change elevation and perspective, in addition to rotation, of a 3D pie chart. If not simple and small to do then it might be overkill to do elevation and perspective.
Useful is the ability to give a startpoint for a slice in the chart wizard. Has a chance for implementation in 'Office later'.
Yes there should be a possibility to change the starting angle of a pie chart. I will take care of this issue.
change title to contain the word 'starting angle'. +accepted
Hint for development: In the series properties dialog for pies we need an additional options tab page with a metric field on it to show the starting angle of the pie. Create a new tabpage class "PieOptionsTabPage" with resources "TP_PIEOPTIONS" in new files "tp_PieOptions.*" with one metric field on it called "~Starting angle" in the UI. Look how this is done for a similar tab page "SchOptionTabPage" and resources "TP_OPTIONS", but use new style prefix "m_" for member names instead. It is important that resources of the same class do have different id's when used in same context. So global resources like the tabpages need to have different ids. And the resources in the tabpage need to be unique within the tabpage, what will be no problem at all having only one metric field. Please use 909 for the new page.
change target to 2.4
I add three new files: tp_PieOptions.src, tp_PieOptions.hxx and tp_PieOptions.cxx, and show the new option page on the pie charttype case: // -->> case OBJECTTYPE_DATA_SERIES: ... if( m_pParameter->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE)) AddTabPage(TP_PIEOPTIONS, String(SchResId (STR_PAGE_PIEOPTIONS)),PieOptionsTabPage::Create, NULL); // <<-- problem: two controls (FixedText FT_STARTING_ANGLE, MetricField MT_STARTING_ANGLE) can't be show on the new option page. any hints ? :)
Have you added according c++ members also to the tabpage class and initialized them from the resources? Another thing. I see you added a method getChartType() to the ObjectPropertiesDialogParameter class. We've had a lot of trouble with charttype dependent switches spreaded all over the code in the old chart. So I would strongly vote against the getChartType() method here which opens that door again. Please put a boolean for the new options page and use the ChartTypeHelper class to provide this charttype dependent information. Look how this is done for the area tabpage with ChartTypeHelper::isSupportingAreaProperties(). Thinking again, we should not call it pie options page at all, because the net chart can make use of this settings also. I think PolarOptions would be a more suitable name.
changing target due to limited resources
Hint for development: To keep the information in the model introduce an additional property 'StartingAngle' at the diagram and the DiagramWrapper. Look how this is done for a similar property 'ConnectBars'. But in contrast to 'ConnectBars' the new property 'StartingAngle' should not be of type boolean but of type sal_Int32 (The property "NumberOfLines" for example is of type sal_Int32). The next version of ODF fileformat will allow a new attribute "angle-offset" for charts. To store the info in the file introduce a new token XML_ANGLE_OFFSET in xmloff to represent the new XML attribute 'angle-offset'. Map the new token to the new property 'StartingAngle'. The type for the new attribute is XML_TYPE_NUMBER. The angle is stored in degrees. Zero degrees should reflect the mathematical zero position at 3 o'clock. 90 degrees maps to 12 o'clock position.
->iha: Firstly, thank you very much for your email, it's useful for me. :-) And I have finished this issue. Please find the final attachment. Please let me know if you have any suggestion.
Created attachment 50196 [details] patch_071210
->weiz: Thanks for the patch! I committed it to CWS chart19 with some changes as discussed via mail.
Thomas, please verify in CWS chart19. For details look at the specification: http://specs.openoffice.org/chart/PieChartOptions.odt The im- and export to xcel will be addressed with a separate issue 85166.
Created attachment 51477 [details] Testcasespec TCS_starting_angle
verified in CWS chart 19
Seen ok in current master -> closed