==================================================================== */\r
package org.apache.poi.xssf.usermodel.examples;\r
\r
-import org.apache.poi.ss.usermodel.*;\r
-import org.apache.poi.ss.usermodel.charts.*;\r
+import java.io.FileOutputStream;\r
+\r
+import org.apache.poi.ss.usermodel.Cell;\r
+import org.apache.poi.ss.usermodel.Chart;\r
+import org.apache.poi.ss.usermodel.ClientAnchor;\r
+import org.apache.poi.ss.usermodel.Drawing;\r
+import org.apache.poi.ss.usermodel.Row;\r
+import org.apache.poi.ss.usermodel.Sheet;\r
+import org.apache.poi.ss.usermodel.Workbook;\r
+import org.apache.poi.ss.usermodel.charts.AxisCrosses;\r
+import org.apache.poi.ss.usermodel.charts.AxisPosition;\r
+import org.apache.poi.ss.usermodel.charts.ChartAxis;\r
+import org.apache.poi.ss.usermodel.charts.ChartDataSource;\r
+import org.apache.poi.ss.usermodel.charts.ChartLegend;\r
+import org.apache.poi.ss.usermodel.charts.DataSources;\r
+import org.apache.poi.ss.usermodel.charts.LegendPosition;\r
+import org.apache.poi.ss.usermodel.charts.LineChartData;\r
+import org.apache.poi.ss.usermodel.charts.ValueAxis;\r
import org.apache.poi.ss.util.CellRangeAddress;\r
import org.apache.poi.xssf.usermodel.XSSFWorkbook;\r
\r
-import java.io.FileOutputStream;\r
-\r
/**\r
* Line chart example.\r
- *\r
- * @author Martin Andersson\r
*/\r
public class LineChart {\r
\r
ChartDataSource<Number> ys2 = DataSources.fromNumericCellRange(sheet, new CellRangeAddress(2, 2, 0, NUM_OF_COLUMNS - 1));\r
\r
\r
- data.addSerie(xs, ys1);\r
- data.addSerie(xs, ys2);\r
+ data.addSeries(xs, ys1);\r
+ data.addSeries(xs, ys2);\r
\r
chart.plot(data, bottomAxis, leftAxis);\r
\r
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-\r
-package org.apache.poi.ss.usermodel.charts;\r
-\r
-import org.apache.poi.ss.util.CellReference;\r
-\r
-/**\r
- * Basic settings for all chart series.\r
- *\r
- * @author Martin Andersson\r
- */\r
-public interface ChartSerie {\r
-\r
- /**\r
- * Sets the title of the series as a string literal.\r
- *\r
- * @param title\r
- */\r
- void setTitle(String title);\r
-\r
- /**\r
- * Sets the title of the series as a cell reference.\r
- *\r
- * @param titleReference\r
- */\r
- void setTitle(CellReference titleReference);\r
-\r
- /**\r
- * @return title as string literal.\r
- */\r
- String getTitleString();\r
-\r
- /**\r
- * @return title as cell reference.\r
- */\r
- CellReference getTitleCellReference();\r
-\r
- /**\r
- * @return title type.\r
- */\r
- TitleType getTitleType();\r
-}\r
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+\r
+package org.apache.poi.ss.usermodel.charts;\r
+\r
+import org.apache.poi.ss.util.CellReference;\r
+\r
+/**\r
+ * Basic settings for all chart series.\r
+ */\r
+public interface ChartSeries {\r
+\r
+ /**\r
+ * Sets the title of the series as a string literal.\r
+ *\r
+ * @param title\r
+ */\r
+ void setTitle(String title);\r
+\r
+ /**\r
+ * Sets the title of the series as a cell reference.\r
+ *\r
+ * @param titleReference\r
+ */\r
+ void setTitle(CellReference titleReference);\r
+\r
+ /**\r
+ * @return title as string literal.\r
+ */\r
+ String getTitleString();\r
+\r
+ /**\r
+ * @return title as cell reference.\r
+ */\r
+ CellReference getTitleCellReference();\r
+\r
+ /**\r
+ * @return title type.\r
+ */\r
+ TitleType getTitleType();\r
+}\r
\r
package org.apache.poi.ss.usermodel.charts;\r
\r
-import org.apache.poi.util.Beta;\r
-\r
import java.util.List;\r
\r
+import org.apache.poi.util.Beta;\r
+\r
/**\r
- * @author Martin Andersson\r
+ * Data for a Line Chart\r
*/\r
@Beta\r
public interface LineChartData extends ChartData {\r
* @param values data source for values.\r
* @return a new line chart serie.\r
*/\r
- LineChartSerie addSerie(ChartDataSource<?> categories, ChartDataSource<? extends Number> values);\r
+ LineChartSeries addSeries(ChartDataSource<?> categories, ChartDataSource<? extends Number> values);\r
\r
/**\r
* @return list of all series.\r
*/\r
- List<? extends LineChartSerie> getSeries();\r
+ List<? extends LineChartSeries> getSeries();\r
}\r
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-\r
-package org.apache.poi.ss.usermodel.charts;\r
-\r
-import org.apache.poi.util.Beta;\r
-\r
-/**\r
- * Represents a line chart serie.\r
- *\r
- * @author Martin Andersson\r
- */\r
-@Beta\r
-public interface LineChartSerie extends ChartSerie {\r
-\r
- /**\r
- * @return data source used for category axis data.\r
- */\r
- ChartDataSource<?> getCategoryAxisData();\r
-\r
- /**\r
- * @return data source used for value axis.\r
- */\r
- ChartDataSource<? extends Number> getValues();\r
-\r
-}\r
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+\r
+package org.apache.poi.ss.usermodel.charts;\r
+\r
+import org.apache.poi.util.Beta;\r
+\r
+/**\r
+ * Represents a line chart series.\r
+ */\r
+@Beta\r
+public interface LineChartSeries extends ChartSeries {\r
+\r
+ /**\r
+ * @return data source used for category axis data.\r
+ */\r
+ ChartDataSource<?> getCategoryAxisData();\r
+\r
+ /**\r
+ * @return data source used for value axis.\r
+ */\r
+ ChartDataSource<? extends Number> getValues();\r
+\r
+}\r
import java.util.List;
/**
- * @author Roman Kashitsyn
+ * Data for a Scatter Chart
*/
public interface ScatterChartData extends ChartData {
/**
* @param xs data source to be used for X axis values
* @param ys data source to be used for Y axis values
- * @return a new scatter charts serie
+ * @return a new scatter charts series
*/
- ScatterChartSerie addSerie(ChartDataSource<?> xs, ChartDataSource<? extends Number> ys);
+ ScatterChartSeries addSerie(ChartDataSource<?> xs, ChartDataSource<? extends Number> ys);
/**
* @return list of all series
*/
- List<? extends ScatterChartSerie> getSeries();
+ List<? extends ScatterChartSeries> getSeries();
}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel.charts;
-
-import org.apache.poi.util.Beta;
-
-/**
- * Represents scatter charts serie.
- *
- * @author Roman Kashitsyn
- * @author Martin Andersson
- */
-@Beta
-public interface ScatterChartSerie extends ChartSerie {
-
- /**
- * @return data source used for X axis values
- */
- ChartDataSource<?> getXValues();
-
- /**
- * @return data source used for Y axis values
- */
- ChartDataSource<? extends Number> getYValues();
-
-}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel.charts;
+
+import org.apache.poi.util.Beta;
+
+/**
+ * Represents scatter charts series.
+ */
+@Beta
+public interface ScatterChartSeries extends ChartSeries {
+
+ /**
+ * @return data source used for X axis values
+ */
+ ChartDataSource<?> getXValues();
+
+ /**
+ * @return data source used for Y axis values
+ */
+ ChartDataSource<? extends Number> getYValues();
+
+}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-\r
-package org.apache.poi.xssf.usermodel.charts;\r
-\r
-import org.apache.poi.ss.usermodel.charts.ChartSerie;\r
-import org.apache.poi.ss.usermodel.charts.TitleType;\r
-import org.apache.poi.ss.util.CellReference;\r
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTSerTx;\r
-\r
-/**\r
- * @author Martin Andersson\r
- */\r
-public abstract class AbstractXSSFChartSerie implements ChartSerie {\r
-\r
- private String titleValue;\r
- private CellReference titleRef;\r
- private TitleType titleType;\r
-\r
- public void setTitle(CellReference titleReference) {\r
- titleType = TitleType.CELL_REFERENCE;\r
- titleRef = titleReference;\r
- }\r
-\r
- public void setTitle(String title) {\r
- titleType = TitleType.STRING;\r
- titleValue = title;\r
- }\r
-\r
- public CellReference getTitleCellReference() {\r
- if (TitleType.CELL_REFERENCE.equals(titleType)) {\r
- return titleRef;\r
- }\r
- throw new IllegalStateException("Title type is not CellReference.");\r
- }\r
-\r
- public String getTitleString() {\r
- if (TitleType.STRING.equals(titleType)) {\r
- return titleValue;\r
- }\r
- throw new IllegalStateException("Title type is not String.");\r
- }\r
-\r
- public TitleType getTitleType() {\r
- return titleType;\r
- }\r
-\r
- protected boolean isTitleSet() {\r
- return titleType != null;\r
- }\r
-\r
- protected CTSerTx getCTSerTx() {\r
- CTSerTx tx = CTSerTx.Factory.newInstance();\r
- switch (titleType) {\r
- case CELL_REFERENCE:\r
- tx.addNewStrRef().setF(titleRef.formatAsString());\r
- return tx;\r
- case STRING:\r
- tx.setV(titleValue);\r
- return tx;\r
- default:\r
- throw new IllegalStateException("Unkown title type: " + titleType);\r
- }\r
- }\r
-}\r
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+\r
+package org.apache.poi.xssf.usermodel.charts;\r
+\r
+import org.apache.poi.ss.usermodel.charts.ChartSeries;\r
+import org.apache.poi.ss.usermodel.charts.TitleType;\r
+import org.apache.poi.ss.util.CellReference;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTSerTx;\r
+\r
+/**\r
+ * Base of all XSSF Chart Series\r
+ */\r
+public abstract class AbstractXSSFChartSeries implements ChartSeries {\r
+\r
+ private String titleValue;\r
+ private CellReference titleRef;\r
+ private TitleType titleType;\r
+\r
+ public void setTitle(CellReference titleReference) {\r
+ titleType = TitleType.CELL_REFERENCE;\r
+ titleRef = titleReference;\r
+ }\r
+\r
+ public void setTitle(String title) {\r
+ titleType = TitleType.STRING;\r
+ titleValue = title;\r
+ }\r
+\r
+ public CellReference getTitleCellReference() {\r
+ if (TitleType.CELL_REFERENCE.equals(titleType)) {\r
+ return titleRef;\r
+ }\r
+ throw new IllegalStateException("Title type is not CellReference.");\r
+ }\r
+\r
+ public String getTitleString() {\r
+ if (TitleType.STRING.equals(titleType)) {\r
+ return titleValue;\r
+ }\r
+ throw new IllegalStateException("Title type is not String.");\r
+ }\r
+\r
+ public TitleType getTitleType() {\r
+ return titleType;\r
+ }\r
+\r
+ protected boolean isTitleSet() {\r
+ return titleType != null;\r
+ }\r
+\r
+ protected CTSerTx getCTSerTx() {\r
+ CTSerTx tx = CTSerTx.Factory.newInstance();\r
+ switch (titleType) {\r
+ case CELL_REFERENCE:\r
+ tx.addNewStrRef().setF(titleRef.formatAsString());\r
+ return tx;\r
+ case STRING:\r
+ tx.setV(titleValue);\r
+ return tx;\r
+ default:\r
+ throw new IllegalStateException("Unkown title type: " + titleType);\r
+ }\r
+ }\r
+}\r
\r
package org.apache.poi.xssf.usermodel.charts;\r
\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
import org.apache.poi.ss.usermodel.Chart;\r
import org.apache.poi.ss.usermodel.charts.ChartAxis;\r
import org.apache.poi.ss.usermodel.charts.ChartDataSource;\r
import org.apache.poi.ss.usermodel.charts.LineChartData;\r
-import org.apache.poi.ss.usermodel.charts.LineChartSerie;\r
+import org.apache.poi.ss.usermodel.charts.LineChartSeries;\r
import org.apache.poi.util.Beta;\r
import org.apache.poi.xssf.usermodel.XSSFChart;\r
-import org.openxmlformats.schemas.drawingml.x2006.chart.*;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTAxDataSource;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTLineChart;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTLineSer;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea;\r
+import org.openxmlformats.schemas.drawingml.x2006.chart.STMarkerStyle;\r
\r
/**\r
- * @author Martin Andersson\r
+ * Holds data for a XSSF Line Chart\r
*/\r
@Beta\r
public class XSSFLineChartData implements LineChartData {\r
/**\r
* List of all data series.\r
*/\r
- private List<Serie> series;\r
+ private List<Series> series;\r
\r
public XSSFLineChartData() {\r
- series = new ArrayList<Serie>();\r
+ series = new ArrayList<Series>();\r
}\r
\r
- static class Serie extends AbstractXSSFChartSerie implements LineChartSerie {\r
+ static class Series extends AbstractXSSFChartSeries implements LineChartSeries {\r
private int id;\r
private int order;\r
private ChartDataSource<?> categories;\r
private ChartDataSource<? extends Number> values;\r
\r
- protected Serie(int id, int order,\r
+ protected Series(int id, int order,\r
ChartDataSource<?> categories,\r
ChartDataSource<? extends Number> values) {\r
this.id = id;\r
}\r
}\r
\r
- public LineChartSerie addSerie(ChartDataSource<?> categoryAxisData, ChartDataSource<? extends Number> values) {\r
+ public LineChartSeries addSeries(ChartDataSource<?> categoryAxisData, ChartDataSource<? extends Number> values) {\r
if (!values.isNumeric()) {\r
throw new IllegalArgumentException("Value data source must be numeric.");\r
}\r
int numOfSeries = series.size();\r
- Serie newSerie = new Serie(numOfSeries, numOfSeries, categoryAxisData, values);\r
- series.add(newSerie);\r
- return newSerie;\r
+ Series newSeries = new Series(numOfSeries, numOfSeries, categoryAxisData, values);\r
+ series.add(newSeries);\r
+ return newSeries;\r
}\r
\r
- public List<? extends LineChartSerie> getSeries() {\r
+ public List<? extends LineChartSeries> getSeries() {\r
return series;\r
}\r
\r
CTLineChart lineChart = plotArea.addNewLineChart();\r
lineChart.addNewVaryColors().setVal(false);\r
\r
- for (Serie s : series) {\r
+ for (Series s : series) {\r
s.addToChart(lineChart);\r
}\r
\r
package org.apache.poi.xssf.usermodel.charts;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.poi.ss.usermodel.Chart;
import org.apache.poi.ss.usermodel.charts.ChartAxis;
import org.apache.poi.ss.usermodel.charts.ChartDataSource;
import org.apache.poi.ss.usermodel.charts.ScatterChartData;
-import org.apache.poi.ss.usermodel.charts.ScatterChartSerie;
+import org.apache.poi.ss.usermodel.charts.ScatterChartSeries;
import org.apache.poi.util.Beta;
import org.apache.poi.xssf.usermodel.XSSFChart;
-import org.openxmlformats.schemas.drawingml.x2006.chart.*;
-
-import java.util.ArrayList;
-import java.util.List;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTAxDataSource;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTScatterChart;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTScatterSer;
+import org.openxmlformats.schemas.drawingml.x2006.chart.CTScatterStyle;
+import org.openxmlformats.schemas.drawingml.x2006.chart.STScatterStyle;
/**
* Represents DrawingML scatter charts.
- *
- * @author Roman Kashitsyn
*/
@Beta
public class XSSFScatterChartData implements ScatterChartData {
/**
* List of all data series.
*/
- private List<Serie> series;
+ private List<Series> series;
public XSSFScatterChartData() {
- series = new ArrayList<Serie>();
+ series = new ArrayList<Series>();
}
/**
* Package private ScatterChartSerie implementation.
*/
- static class Serie extends AbstractXSSFChartSerie implements ScatterChartSerie {
+ static class Series extends AbstractXSSFChartSeries implements ScatterChartSeries {
private int id;
private int order;
private ChartDataSource<?> xs;
private ChartDataSource<? extends Number> ys;
- protected Serie(int id, int order,
+ protected Series(int id, int order,
ChartDataSource<?> xs,
ChartDataSource<? extends Number> ys) {
super();
}
}
- public ScatterChartSerie addSerie(ChartDataSource<?> xs,
+ public ScatterChartSeries addSerie(ChartDataSource<?> xs,
ChartDataSource<? extends Number> ys) {
if (!ys.isNumeric()) {
throw new IllegalArgumentException("Y axis data source must be numeric.");
}
int numOfSeries = series.size();
- Serie newSerie = new Serie(numOfSeries, numOfSeries, xs, ys);
+ Series newSerie = new Series(numOfSeries, numOfSeries, xs, ys);
series.add(newSerie);
return newSerie;
}
CTScatterChart scatterChart = plotArea.addNewScatterChart();
addStyle(scatterChart);
- for (Serie s : series) {
+ for (Series s : series) {
s.addToChart(scatterChart);
}
}
}
- public List<? extends Serie> getSeries() {
+ public List<? extends Series> getSeries() {
return series;
}
import org.apache.poi.ss.usermodel.charts.ChartDataSource;\r
import org.apache.poi.ss.usermodel.charts.DataSources;\r
import org.apache.poi.ss.usermodel.charts.LineChartData;\r
-import org.apache.poi.ss.usermodel.charts.LineChartSerie;\r
+import org.apache.poi.ss.usermodel.charts.LineChartSeries;\r
import org.apache.poi.ss.util.CellRangeAddress;\r
import org.apache.poi.ss.util.SheetBuilder;\r
import org.apache.poi.xssf.usermodel.XSSFWorkbook;\r
\r
/**\r
- * @author Martin Andersson\r
+ * Tests for XSSF Line Charts\r
*/\r
public class TestXSSFLineChartData extends TestCase {\r
\r
\r
ChartDataSource<String> xs = DataSources.fromStringCellRange(sheet, CellRangeAddress.valueOf("A1:J1"));\r
ChartDataSource<Number> ys = DataSources.fromNumericCellRange(sheet, CellRangeAddress.valueOf("A2:J2"));\r
- LineChartSerie series = lineChartData.addSerie(xs, ys);\r
+ LineChartSeries series = lineChartData.addSeries(xs, ys);\r
\r
assertNotNull(series);\r
assertEquals(1, lineChartData.getSeries().size());\r
import junit.framework.TestCase;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Chart;
+import org.apache.poi.ss.usermodel.ClientAnchor;
+import org.apache.poi.ss.usermodel.Drawing;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.charts.AxisPosition;
+import org.apache.poi.ss.usermodel.charts.ChartAxis;
+import org.apache.poi.ss.usermodel.charts.ChartDataSource;
+import org.apache.poi.ss.usermodel.charts.DataSources;
+import org.apache.poi.ss.usermodel.charts.ScatterChartData;
+import org.apache.poi.ss.usermodel.charts.ScatterChartSeries;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.SheetBuilder;
-import org.apache.poi.ss.usermodel.charts.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
/**
* Tests for XSSFScatterChartData.
- *
- * @author Roman Kashitsyn
*/
public final class TestXSSFScatterChartData extends TestCase {
ChartDataSource<String> xs = DataSources.fromStringCellRange(sheet, CellRangeAddress.valueOf("A1:J1"));
ChartDataSource<Number> ys = DataSources.fromNumericCellRange(sheet, CellRangeAddress.valueOf("A2:J2"));
- ScatterChartSerie series = scatterChartData.addSerie(xs, ys);
+ ScatterChartSeries series = scatterChartData.addSerie(xs, ys);
assertNotNull(series);
assertEquals(1, scatterChartData.getSeries().size());