Exception in thread "main" class com.aspose.slides.ms.pbdb106a0.bt: Exception of type System.Exception was thrown

Hi,


I am getting the Exception as below.

Exception in thread “main” class com.aspose.slides.ms.pbdb106a0.bt: Exception of type System.Exception was thrown.
com.aspose.slides.cg.do(Unknown Source)
com.aspose.slides.hy.do(Unknown Source)
com.aspose.slides.hy.do(Unknown Source)
com.aspose.slides.ib.do(Unknown Source)
com.aspose.slides.ij.do(Unknown Source)
com.aspose.slides.aar.do(Unknown Source)
com.aspose.slides.aar.do(Unknown Source)
com.aspose.slides.eb.do(Unknown Source)
com.aspose.slides.bfk.do(Unknown Source)
com.aspose.slides.ayn.do(Unknown Source)
com.aspose.slides.ayn.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.save(Unknown Source)

I am Using Aspose-Slide - 16.8.0
Jre - 1.8.0


Is i am Missing Something ?




Hi,


I have observed your comments. Can you please use Aspose.Slides latest version on your end. If there is still an issue then please share source presentation, environment details so that we can help you out to resolve issue.

Best Regards,

Hi,


Still That Error is coming.
I have used 16.11.0 Aspose Java Version.
I have Attached Code Example For the Respective Error.
Using JRE - 1.8.0.

Below Is the Code Sample :-


IChart chart =slide.getShapes().addChart(ChartType.PercentsStackedBar, slide.getShapes().get_Item((shapes.get(“Content Placeholder 2”)).intValue()).getX(),
slide.getShapes().get_Item((shapes.get(“Content Placeholder 2”)).intValue()).getY(),
slide.getShapes().get_Item((shapes.get(“Content Placeholder 2”)).intValue()).getWidth(),
slide.getShapes().get_Item((shapes.get(“Content Placeholder 2”)).intValue()).getHeight());

//Getting the default chart data worksheet index
int defaultWorksheetIndex = 0;

//Getting the chart data worksheet
IChartDataWorkbook fact = chart.getChartData().getChartDataWorkbook();

//Delete demo series
chart.getChartData().getSeries().clear();

//Add new series
chart.getChartData().getSeries().add(fact.getCell(defaultWorksheetIndex, 1, 1, “Series 1”), chart.getType());
chart.getChartData().getSeries().add(fact.getCell(defaultWorksheetIndex, 1, 2, “Series 2”), chart.getType());
chart.getChartData().getSeries().add(fact.getCell(defaultWorksheetIndex, 1, 3, “Series 3”), ChartType.ScatterWithStraightLinesAndMarkers);
//Adding new categories
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 1, 0, “Caetegoty 1”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 2, 0, “Caetegoty 2”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 3, 0, “Caetegoty 3”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 4, 0, “Caetegoty 4”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 5, 0, “Caetegoty 5”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 6, 0, “Caetegoty 6”));


//Take first chart series
IChartSeries series = chart.getChartData().getSeries().get_Item(2);
//Add new point (1:3) there.
series.getDataPoints().addDataPointForScatterSeries(fact.getCell(defaultWorksheetIndex, 2, 1, 1), fact.getCell(defaultWorksheetIndex, 2, 2, 3));

//Add new point (2:10)
series.getDataPoints().addDataPointForScatterSeries(fact.getCell(defaultWorksheetIndex, 3, 1, 2), fact.getCell(defaultWorksheetIndex, 3, 2, 10));

//Edit the type of series
series.setType (ChartType.ScatterWithStraightLinesAndMarkers);

//Changing the chart series marker
series.getMarker().setSize(10);
series.getMarker().setSymbol(MarkerStyleType.Star);

Hi,

I have worked with the sample code shared by you and have been able to reproduce the issue. An issue with ID SLIDESJAVA-35824 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

We are sorry for your inconvenience,

Hi,


I Got The Solution of it.
When we are plotting Scattered Chart on Series, there we need to plot on SecondaryAxis.

i.e. series.setPlotOnSecondAxis(true);


Hi,


We are glad to know that you solved your problem on your own. Can we close the issue ticket now if problem is solved.

Best Regards,

Hello,


You can Work on that ticket . Because it is not sure that same solution will be applicable for all the cases.If someone want to plot on Primary Axis then this error will come.
If we can have better solution for this, than it will be more flexible to adapt it.


Thank You.

Hi,

Thank you for sharing the feedback. I have requested our product team to investigate if two series of different types can be plotted on same axis or not. They will be investigating the issue under associated ticket and I will share further feedback with you as soon as it will be shared by them.

Many Thanks,

Hi,

We have investigated the issue further on our end and like to share that you need to plot the different series on chart’s secondary axis. The following sample code will help you in this regard.

//Changing the chart series marker
series.getMarker().setSize(10);
series.getMarker().setSymbol(MarkerStyleType.Star);

//Set PlotOnSecondAxis = true
series.setPlotOnSecondAxis(true);

pres.save(“Test.pptx”,SaveFormat.Pptx);

Many Thanks,

The issues you have found earlier (filed as SLIDESJAVA-35824) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.