XDDFLineChartData.Series - setTitle NullPointer issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

XDDFLineChartData.Series - setTitle NullPointer issue

choo.chenwei95@gmail.com
Exception in thread "main" java.lang.NullPointerException at org.apache.poi.xddf.usermodel.chart.XDDFChartData$Series.setTitle(XDDFChartData.java:122)

My Code is shown as bellow:
CellReference cellref = new CellReference("A6");

//A6 value = "My Title"

XDDFLineChartData.Series series3 = (XDDFLineChartData.Series)data.addSeries(xs, ys3);
series3.setMarkerSize((short) 6);
series3.setMarkerStyle(MarkerStyle.DIAMOND);

series3.setTitle("My Title",cellref);

even tried with:
series3.setTitle("My Title",null);

From what I saw the at https://svn.apache.org/viewvc/poi/tags/REL_4_0_0_FINAL/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java?view=markup#l117.

If arg1 is null, it should set the title. But it's giving NullPointer problem.

Is it a bug or is it my issue?

Thanks for the help and reply.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]