Hi. I have founded that can’t create chart like i did it in Excel.
1) I have some range (3 columns). 1st column represents a category data (datetime), 2nd and 3rd - are data-columns.
2) In Excel i have created chart with range “A4:C18”. Click by “transparent” button and have received right chart with 2 series.
I tried to do this by code, but it failure - created chart have no datetime axisX type. It contains 3 sereis.
public void chartTest() {
try {
Workbook wb = new Workbook(“D:\chart.xls”);
Worksheet chartSheet = wb.getWorksheets().add(“TestChart”);
int idx = chartSheet.getCharts().add(ChartType.COLUMN, 5, 5, 20, 10);
Chart chart = chartSheet.getCharts().get(idx);
chart.getNSeries().add(“Данные!A4:C18”, true);
wb.save(“D:\out.xls”);
} catch (Exception e) {
e.printStackTrace();
assertNull(e);
}
}
Can you please explain me - how i can create chart by my range?
Best regards. Alexey