Difference between revisions of "Documentation/DevGuide/Charts/Pie Charts"
From Apache OpenOffice Wiki
< Documentation | DevGuide
(Initial author Sun Microsystems, Inc.) |
m |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 7: | Line 7: | ||
|NextPage=Documentation/DevGuide/Charts/Stock Charts | |NextPage=Documentation/DevGuide/Charts/Stock Charts | ||
}} | }} | ||
| − | {{DISPLAYTITLE:Pie Charts}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Charts/{{SUBPAGENAME}}}} |
| + | {{DISPLAYTITLE:Pie Charts}} | ||
<!--<idltopic>com.sun.star.chart.ChartPieSegmentProperties</idltopic>--> | <!--<idltopic>com.sun.star.chart.ChartPieSegmentProperties</idltopic>--> | ||
Pie charts support the offset of pie segments with the service <idl>com.sun.star.chart.ChartPieSegmentProperties</idl> that has a property <code>SegmentOffset</code> to drag pie slices radially from the center up to an amount equal to the radius of the pie. This property reflects a percentage, that is, values can go from 0 to 100. | Pie charts support the offset of pie segments with the service <idl>com.sun.star.chart.ChartPieSegmentProperties</idl> that has a property <code>SegmentOffset</code> to drag pie slices radially from the center up to an amount equal to the radius of the pie. This property reflects a percentage, that is, values can go from 0 to 100. | ||
| − | + | <syntaxhighlight lang="java"> | |
// ... | // ... | ||
| Line 16: | Line 17: | ||
aPointProp = maDiagram.getDataPointProperties(3, 0) | aPointProp = maDiagram.getDataPointProperties(3, 0) | ||
aPointProp.setPropertyValue("SegmentOffset", 50) | aPointProp.setPropertyValue("SegmentOffset", 50) | ||
| − | + | </syntaxhighlight> | |
Note that the <code>SegmentOffset</code> property is not available for donut charts and three-dimensional pie charts. | Note that the <code>SegmentOffset</code> property is not available for donut charts and three-dimensional pie charts. | ||
{{PDL1}} | {{PDL1}} | ||
| − | [[Category: Charts]] | + | |
| + | [[Category:Documentation/Developer's Guide/Charts]] | ||
Latest revision as of 19:34, 20 December 2020
Pie charts support the offset of pie segments with the service com.sun.star.chart.ChartPieSegmentProperties that has a property SegmentOffset to drag pie slices radially from the center up to an amount equal to the radius of the pie. This property reflects a percentage, that is, values can go from 0 to 100.
// ...
// drag the fourth segment 50% out
aPointProp = maDiagram.getDataPointProperties(3, 0)
aPointProp.setPropertyValue("SegmentOffset", 50)
Note that the SegmentOffset property is not available for donut charts and three-dimensional pie charts.
| Content on this page is licensed under the Public Documentation License (PDL). |