diff options
Diffstat (limited to 'src')
7 files changed, 10 insertions, 10 deletions
diff --git a/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java index 01cdaf5def..a80916148a 100644 --- a/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java @@ -137,7 +137,7 @@ public final class ExcelChartWithTargetLine { } XDDFScatterChartData scatter = (XDDFScatterChartData) chart.createData(ChartTypes.SCATTER, scatterX, scatterY); - scatter.setVaryColors(true); + scatter.setVaryColors(false); // This only works for Excel since OpenOffice or LibreOffice Calc does not support literal numeric data series. XDDFNumericalDataSource<Double> targetDS = XDDFDataSourcesFactory.fromArray(new Double[] { target, target }); diff --git a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java index 641d3e7bf4..d26907c30e 100644 --- a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java @@ -63,7 +63,7 @@ public final class BarChartExample { } try (FileInputStream argIS = new FileInputStream(args[0]); - BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.ISO_8859_1)) { + BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) { String chartTitle = modelReader.readLine(); // first line is chart title String[] series = modelReader.readLine().split(","); diff --git a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java index 1104c70057..889ff30fb1 100644 --- a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java @@ -67,7 +67,7 @@ public final class ChartFromScratch { return; } - try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.ISO_8859_1)) { + try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) { String chartTitle = modelReader.readLine(); // first line is chart title String[] series = modelReader.readLine().split(","); diff --git a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java index 6f49a18dca..ca5c40aaf1 100644 --- a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java +++ b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/chart/TestXDDFChartRemoveSeries.java @@ -117,7 +117,7 @@ class TestXDDFChartRemoveSeries { } /** - * Remove the first series by calling chartData.getSeries().remove(0). + * Attempt to remove the first series by calling chartData.getSeries().remove(0). * <p> * This used to corrupt the workbook but the returned <code>List</code> is unmodifiable. */ @@ -171,4 +171,4 @@ class TestXDDFChartRemoveSeries { assertEquals(2, chartData.getSeriesCount()); } -}
\ No newline at end of file +} diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java index faa4cb0fc2..71ff251ede 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFLineChartData.java @@ -67,8 +67,8 @@ class TestXSSFLineChartData { XDDFChartData.Series series = lineChartData.addSeries(xs, ys); assertNotNull(series); - assertEquals(1, lineChartData.getSeries().size()); - assertTrue(lineChartData.getSeries().contains(series)); + assertEquals(1, lineChartData.getSeriesCount()); + assertTrue(lineChartData.getSeries(0) == series); chart.plot(lineChartData); wb.close(); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java index 5866c33754..16f0fa68fe 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFScatterChartData.java @@ -70,8 +70,8 @@ public final class TestXSSFScatterChartData { assertEquals(ScatterStyle.LINE_MARKER, scatterChartData.getStyle()); assertNotNull(series); - assertEquals(1, scatterChartData.getSeries().size()); - assertTrue(scatterChartData.getSeries().contains(series)); + assertEquals(1, scatterChartData.getSeriesCount()); + assertTrue(scatterChartData.getSeries(0) == series); chart.plot(scatterChartData); wb.close(); diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java index c01846636c..eca90582e9 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java @@ -56,7 +56,7 @@ class TestXWPFChart { assertEquals(1, chart.getChartSeries().size()); XDDFChartData data = chart.getChartSeries().get(0); assertEquals(XDDFBarChartData.class, data.getClass()); - assertEquals(3, data.getSeries().size()); + assertEquals(3, data.getSeriesCount()); } /** |