Issue 16776 - starting angle for pie charts - rotation of pie charts
Summary: starting angle for pie charts - rotation of pie charts
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL: http://specs.openoffice.org/chart/Pie...
Keywords: ms_interoperability, rfe_eval_ok
Depends on:
Blocks: 72764 85166
  Show dependency tree
 
Reported: 2003-07-13 04:29 UTC by philmperry
Modified: 2013-02-24 21:22 UTC (History)
6 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch_071210 (8.13 KB, text/plain)
2007-12-10 06:44 UTC, weiz
no flags Details
Testcasespec TCS_starting_angle (17.58 KB, text/html)
2008-02-12 14:26 UTC, kla
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description philmperry 2003-07-13 04:29:55 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.
Comment 1 oc 2003-07-17 13:16:56 UTC
adjusing component to chart
Comment 2 kla 2003-07-21 12:47:28 UTC
HI Bettina,
one for you.
tk
Comment 3 kla 2003-07-21 13:35:12 UTC
Hi Bettina,
one for you.
tk
Comment 4 philmperry 2003-08-07 23:08:40 UTC
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.
Comment 5 bettina.haberer 2003-10-15 16:55:04 UTC
Useful is the ability to give a startpoint for a slice in the chart
wizard. 
Has a chance for implementation in 'Office later'. 
Comment 6 IngridvdM 2006-01-13 18:18:19 UTC
Yes there should be a possibility to change the starting angle of a pie chart. I
will take care of this issue.
Comment 7 IngridvdM 2006-01-13 18:21:29 UTC
change title to contain the word 'starting angle'.
+accepted
Comment 8 IngridvdM 2007-07-24 10:02:05 UTC
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.
Comment 9 IngridvdM 2007-07-24 15:24:27 UTC
change target to 2.4
Comment 10 liyuan 2007-07-25 10:42:07 UTC
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 ? :)
Comment 11 IngridvdM 2007-07-25 17:19:31 UTC
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.
Comment 12 IngridvdM 2007-10-25 07:54:29 UTC
changing target due to limited resources
Comment 13 IngridvdM 2007-12-04 12:47:02 UTC
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.
Comment 14 weiz 2007-12-10 06:43:07 UTC
->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.
Comment 15 weiz 2007-12-10 06:44:05 UTC
Created attachment 50196 [details]
patch_071210
Comment 16 IngridvdM 2007-12-15 15:15:42 UTC
->weiz: Thanks for the patch! I committed it to CWS chart19 with some changes as
discussed via mail.
Comment 17 IngridvdM 2008-01-11 10:59:31 UTC
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.
Comment 18 kla 2008-02-12 14:26:44 UTC
Created attachment 51477 [details]
Testcasespec TCS_starting_angle
Comment 19 kla 2008-02-12 17:12:05 UTC
verified in CWS chart 19
Comment 20 kla 2008-06-17 11:15:11 UTC
Seen ok in current master -> closed