diff options
author | Alain Béarez <abearez@apache.org> | 2019-05-21 00:13:40 +0000 |
---|---|---|
committer | Alain Béarez <abearez@apache.org> | 2019-05-21 00:13:40 +0000 |
commit | 093cbcfccae37db00b182683df1fc6480047230f (patch) | |
tree | 048b9e247433b5c1607b2b496355bdc2ebff8d54 /src/examples | |
parent | af1dacfe2c5ccfb8bee0c1e7517cce5d698f6833 (diff) | |
download | poi-093cbcfccae37db00b182683df1fc6480047230f.tar.gz poi-093cbcfccae37db00b182683df1fc6480047230f.zip |
code cleanup plus fix for bug 63153
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1859590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
4 files changed, 10 insertions, 10 deletions
diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java b/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java index 3b96eb0bda..bd8ff14c4c 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java +++ b/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java @@ -108,7 +108,7 @@ public class BarChartDemo { values1[6] = 16.0; // if you ever want to change the underlying data final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, 2); - XDDFChartData.Series series1 = bar.getSeries().get(0); + XDDFChartData.Series series1 = bar.getSeries(0); series1.replaceData(categoriesData, valuesData); series1.setTitle(series[0], chart.setSheetTitle(series[0], 0)); XDDFChartData.Series series2 = bar.addSeries(categoriesData, valuesData2); diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java b/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java index 4f020550db..1cc8aa2b10 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java +++ b/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java @@ -98,10 +98,10 @@ public class PieChartDemo { final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange); final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values, valuesDataRange); - XDDFPieChartData.Series firstSeries = (XDDFPieChartData.Series) pie.getSeries().get(0); + XDDFPieChartData.Series firstSeries = (XDDFPieChartData.Series) pie.getSeries(0); firstSeries.replaceData(categoriesData, valuesData); firstSeries.setTitle(chartTitle, chart.setSheetTitle(chartTitle, 0)); - firstSeries.setExplosion(25); + firstSeries.setExplosion(25L); chart.plot(pie); // save the result diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java index f674a37a38..b8e36ccbef 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java +++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java @@ -144,16 +144,16 @@ public class BarAndLineChart { // the line chart on secondary axis XDDFLineChartData lines = (XDDFLineChartData) chart.createData(ChartTypes.LINE, lineCategories, rightValues); - - //uncomment below line if only primary axis required and comment above line + + //uncomment below line if only primary axis required and comment above line // the line chart on primary axis /*XDDFLineChartData lines = (XDDFLineChartData) chart.createData(ChartTypes.LINE, lineCategories, leftValues);*/ - - + + XDDFLineChartData.Series series2 = (XDDFLineChartData.Series) lines.addSeries(xs, ys2); - series2.updateIdXVal(1); - series2.updateOrderVal(1); + series2.setIndex(1); + series2.setOrder(1); series2.setTitle("Lines", new CellReference("Sheet1!$C$1")); lines.setVaryColors(true); chart.plot(lines); diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java b/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java index ebce9410d1..731b732f8d 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java +++ b/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java @@ -110,7 +110,7 @@ public class BarChartExample { values1[6] = 16.0; // if you ever want to change the underlying data final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, 2); - XDDFChartData.Series series1 = bar.getSeries().get(0); + XDDFChartData.Series series1 = bar.getSeries(0); series1.replaceData(categoriesData, valuesData); series1.setTitle(series[0], chart.setSheetTitle(series[0], 0)); XDDFChartData.Series series2 = bar.addSeries(categoriesData, valuesData2); |