Difference between revisions of "Pptx chart"

From Apache OpenOffice Wiki
Jump to: navigation, search
(+cat)
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<p style="text-align:center;">Pptx chart summary</p><br />
 
<p style="text-align:center;">Pptx chart summary</p><br />
we can support these feature:<br />
+
'''we can support these feature:<br />'''
 
*chart type<br />
 
*chart type<br />
 
Total: 73 types<br />
 
Total: 73 types<br />
Line 11: Line 11:
 
We can support formatted number label. Example:<br />
 
We can support formatted number label. Example:<br />
 
In chart.xml, the follow is a row label string.<br />
 
In chart.xml, the follow is a row label string.<br />
< c:formatCode>yyyy/m/d</c:formatCode> <br />
+
''< c:formatCode>yyyy/m/d< /c:formatCode>'' <br />
<c:ptCount val="5" /> <br />
+
''< c:ptCount val="5" />'' <br />
<c:pt idx="0"> <br />
+
''< c:pt idx="0">'' <br />
<c:v>37261</c:v> <br />
+
''< c:v>37261< /c:v> <br />''
 
Then the number 37261 will be formatted to a string ‘2002/1/5’. And ‘2002/1/5’ will be a label string.<br />
 
Then the number 37261 will be formatted to a string ‘2002/1/5’. And ‘2002/1/5’ will be a label string.<br />
 
Or In chart.xml, the follow is a row label string.<br />
 
Or In chart.xml, the follow is a row label string.<br />
<c:formatCode>"¥"#,##0.00</c:formatCode> <br />
+
''< c:formatCode>"¥"#,##0.00< /c:formatCode> <br />''
<c:ptCount val="5" /> <br />
+
''< c:ptCount val="5" /> <br />''
<c:pt idx="0"> <br />
+
''< c:pt idx="0"> <br />''
<c:v>1</c:v> <br />
+
''< c:v>1< /c:v> <br />''
Then the number 1 will be formatted to a string ‘¥1.00'. And ‘¥1.00’ will be a label string. <br />
+
Then the number 1 will be formatted to a string ‘¥1.00'. And ‘¥1.00’ will be a label string. <br /><br />
 +
*data range
 +
Chart data doesn’t store in a matrix sometimes. They can store look like this:<br />
 +
[[File:11.jpg]]<br />
 +
We can select a data range or switch rows and columns.<br />
 +
We can support these charts.<br /><br />
 +
*label source linked
 +
Chart label format can be not the same to the source data, we can set it directly. Example:<br />
 +
[[File:pptxchart2.jpg]]<br />
 +
If we don’t select ‘Linked to source’, the chart’s label format and source data format can be different.<br />
 +
We can support this feature. <br /><br /><br />
 +
'''Solution<br />'''
 +
1, Add a new class 'PPtChartConverter' derived from the class 'ChartConverter'.<br />
 +
2, In this class the chart data(label) can be load.<br />
 +
3, Set these data into chart model.<br />
  
[[File:11.jpg]]
+
[[Category:Chart]]
ddddd
+

Latest revision as of 21:17, 25 September 2013

Pptx chart summary


we can support these feature:

  • chart type

Total: 73 types
Support correctly: 67 types
Not support: 6 types. They are:
4 Surface types, Pie of Pie type, Bar of Pie type.
If a chart can’t be supported, then an empty chart will display.
We can load these charts and save them in the odp file.

  • chart label format

We can support formatted number label. Example:
In chart.xml, the follow is a row label string.
< c:formatCode>yyyy/m/d< /c:formatCode>
< c:ptCount val="5" />
< c:pt idx="0">
< c:v>37261< /c:v>
Then the number 37261 will be formatted to a string ‘2002/1/5’. And ‘2002/1/5’ will be a label string.
Or In chart.xml, the follow is a row label string.
< c:formatCode>"¥"#,##0.00< /c:formatCode>
< c:ptCount val="5" />
< c:pt idx="0">
< c:v>1< /c:v>
Then the number 1 will be formatted to a string ‘¥1.00'. And ‘¥1.00’ will be a label string.

  • data range

Chart data doesn’t store in a matrix sometimes. They can store look like this:
11.jpg
We can select a data range or switch rows and columns.
We can support these charts.

  • label source linked

Chart label format can be not the same to the source data, we can set it directly. Example:
Pptxchart2.jpg
If we don’t select ‘Linked to source’, the chart’s label format and source data format can be different.
We can support this feature.


Solution
1, Add a new class 'PPtChartConverter' derived from the class 'ChartConverter'.
2, In this class the chart data(label) can be load.
3, Set these data into chart model.

Personal tools