}
@Test
public void testCreateChartWithCellRange() {
try {
SpreadsheetDocument doc = (SpreadsheetDocument) Document.loadDocument(ResourceUtilities
.getTestResourceAsStream(TEST_FILE));
String barTitle = "Bar Chart with CellRange ";
String areaTitle = "AREA Chart with CellRange";
Rectangle rect = new Rectangle();
rect.x = 2000;
rect.y = 2700;
rect.width = 10000;
rect.height = 12000;
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.A1:A.E21"), true, true, true, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.A1:A.E21"), true, true, false, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.B1:A.E21"), true, false, true, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.B1:A.E21"), true, false, false, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.A2:A.E21"), false, true, true, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.A2:A.E21"), false, true, false, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.B2:A.E21"), false, false, true, rect);
doc.createChart(barTitle, doc, CellRangeAddressList.valueOf("A.B2:A.E21"), false, false, false, rect);
Chart chartID8 = doc.createChart(areaTitle, doc, CellRangeAddressList.valueOf("A.B2:A.E21"), false, false,
false, rect);
Chart chart8 = doc.getChartById(chartID8.getChartID());
chart8.setChartType(ChartType.AREA);
Assert.assertEquals(ChartType.AREA, chart8.getChartType());
//Assert.assertEquals(8, doc.getChartByTitle(barTitle).size());
Assert.assertNotNull(doc.getChartByTitle(areaTitle));
doc.save(ResourceUtilities.newTestOutputFile(CHART_FILE2));
} catch (Exception e) {
Logger.getLogger(DataSetTest.class.getName()).log(Level.SEVERE, null, e);
Assert.fail("Failed with " + e.getClass().getName() + ": '" + e.getMessage() + "'");
}