Juan Pablo Barani created ODFTOOLKIT-390:
--------------------------------------------

             Summary: setChartData always resets the chart type to column chart 
/ Chart type always returns the same value
                 Key: ODFTOOLKIT-390
                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-390
             Project: ODF Toolkit
          Issue Type: Bug
          Components: odfdom, simple api
    Affects Versions: 0.6.1-incubating
         Environment: Windows 8 - Java 1.7 - Eclipse Kepler
            Reporter: Juan Pablo Barani


Hi! I found several things that may be related to the same issue. I am 
developing an application that simply gets a template chart, and replaces the 
datasets. 

However, in the process the chart type gets changed automatically without 
reason. These are the sub-issues I found:

1) When getting the chart type of a chart in a text document, the value 
returned is always the same, no matter if we have a pieChart or something 
different:

textDocument.getChartByTitle("myChart").get(0).getChartType();
Value: "chart:bar"

Also tried with getChartById, bit no luck, it always returns the same value.

2) If I set a new dataset (even the same one as before) by the following code:

Chart l_firstChart = l_originalTextDocument.getChartByTitle("myChart").get(0);
l_firstChart.setChartData(l_firstChart.getChartData());

The chart is automatically converted back to a column chart, no matter what the 
original chart type was.

3) I could set again the chart type manually. However, if we have a chart with 
horizontal bars, there is no way to get it right;

l_firstChart.setChartType(ChartType.BAR);

will redraw the chart with vertical bars (columns), and there is no such 
setting as ChartType.COLUMN or something similar.

Unfortunately this is preventing us from using the library to manipulate the 
charts. I tried updated to the latest simpleodf version, but no luck :-(



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to