@jnachi1699,
With Aspose.Slides for Java 25.7, please use the following code snippet:
Presentation pres = new Presentation();
try {
ISlide slide = pres.getSlides().get_Item(0);
IChart chart = slide.getShapes().addChart(ChartType.Area, 50, 50, 600, 400, true);
IChartData chartData = chart.getChartData();
chartData.getCategories().clear();
chartData.getSeries().clear();
chart.setLegend(false);
IChartDataWorkbook wb = chart.getChartData().getChartDataWorkbook();
chartData.getSeries().add(wb.getCell(0, "B1", "Series1"), chart.getType());
chartData.getSeries().add(wb.getCell(0, "C1", "Series2"), chart.getType());
chartData.getSeries().add(wb.getCell(0, "D1", "Series3"), chart.getType());
chartData.getCategories().add(wb.getCell(0, "A2", 0));
chartData.getCategories().add(wb.getCell(0, "B2", 100));
chartData.getCategories().add(wb.getCell(0, "C2", 150));
chartData.getCategories().add(wb.getCell(0, "D2", 200));
chartData.getSeries().get_Item(0).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "B2", 100));
chartData.getSeries().get_Item(0).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "B3", 100));
chartData.getSeries().get_Item(1).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "C2", 150));
chartData.getSeries().get_Item(1).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "C3", 150));
chartData.getSeries().get_Item(1).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "C4", 150));
chartData.getSeries().get_Item(2).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "D2", 200));
chartData.getSeries().get_Item(2).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "D3", 200));
chartData.getSeries().get_Item(2).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "D4", 200));
chartData.getSeries().get_Item(2).getDataPoints().addDataPointForAreaSeries(wb.getCell(0, "D5", 200));
IDataLabel label = chart.getChartData().getSeries().get_Item(0).getDataPoints().get_Item(1).getLabel();
label.getTextFrameForOverriding().setText("Test1\n100$");
label.getDataLabelFormat().setShowValue(true);
label.setX(-0.03f);
label.setY(-0.12f);
label = chart.getChartData().getSeries().get_Item(1).getDataPoints().get_Item(2).getLabel();
label.getTextFrameForOverriding().setText("Test2\n150$");
label.getDataLabelFormat().setShowValue(true);
label.setX(-0.03f);
label.setY(-0.22f);
label = chart.getChartData().getSeries().get_Item(2).getDataPoints().get_Item(3).getLabel();
label.getTextFrameForOverriding().setText("Test3\n200$");
label.getDataLabelFormat().setShowValue(true);
label.setX(-0.03f);
label.setY(-0.32f);
chartData.getSeries().get_Item(0).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().setFontHeight(10);
chartData.getSeries().get_Item(0).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
chartData.getSeries().get_Item(0).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
chartData.getSeries().get_Item(1).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().setFontHeight(10);
chartData.getSeries().get_Item(1).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
chartData.getSeries().get_Item(1).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
chartData.getSeries().get_Item(2).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().setFontHeight(10);
chartData.getSeries().get_Item(2).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
chartData.getSeries().get_Item(2).getLabels().getDefaultDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
chartData.getSeries().get_Item(2).setOrder(0);
chartData.getSeries().get_Item(1).setOrder(1);
chartData.getSeries().get_Item(0).setOrder(2);
chart.setDisplayBlanksAs(DisplayBlanksAsType.Gap);
chart.getAxes().getHorizontalAxis().setCategoryAxisType(CategoryAxisType.Date);
chart.getAxes().getHorizontalAxis().setAutomaticMajorUnit(false);
chart.getAxes().getHorizontalAxis().setMajorUnit(1);
chart.getAxes().getHorizontalAxis().setMajorUnitScale(TimeUnitType.Days);
chart.getAxes().getHorizontalAxis().setMajorTickMark(TickMarkType.Outside);
chart.getAxes().getHorizontalAxis().setAutomaticMinorUnit(false);
chart.getAxes().getHorizontalAxis().setMinorUnit(1);
chart.getAxes().getHorizontalAxis().setMinorUnitScale(TimeUnitType.Days);
chart.getAxes().getHorizontalAxis().setMinorTickMark(TickMarkType.Outside);
chart.getAxes().getHorizontalAxis().setNumberFormatLinkedToSource(false);
chart.getAxes().getHorizontalAxis().setNumberFormat("General");
chart.getAxes().getHorizontalAxis().setTickLabelRotationAngle(0);
chart.getAxes().getHorizontalAxis().setBaseUnitScale(TimeUnitType.Days);
chart.getAxes().getHorizontalAxis().getTextFormat().getPortionFormat().setFontHeight(12.0f);
chart.getAxes().getHorizontalAxis().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
chart.getAxes().getHorizontalAxis().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(new Color(89, 89, 89));
chart.getAxes().getVerticalAxis().getTextFormat().getPortionFormat().setFontHeight(12.0f);
chart.getAxes().getVerticalAxis().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
chart.getAxes().getVerticalAxis().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(new Color(89, 89, 89));
chart.getAxes().getVerticalAxis().getFormat().getLine().getFillFormat().setFillType(FillType.NoFill);
chart.getAxes().getVerticalAxis().getMajorGridLinesFormat().getLine().getFillFormat().setFillType(FillType.NoFill);
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(0).getFormat().getFill().setFillType(FillType.Solid);
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(0).getFormat().getFill().getSolidFillColor().setColor(new Color(68, 114, 196));
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(1).getFormat().getFill().setFillType(FillType.Solid);
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(1).getFormat().getFill().getSolidFillColor().setColor(new Color(237, 125, 49));
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(2).getFormat().getFill().setFillType(FillType.Solid);
chart.getChartData().getSeriesGroups().get_Item(0).get_Item(2).getFormat().getFill().getSolidFillColor().setColor(new Color(165, 165, 165));
pres.save("output.pptx", SaveFormat.Pptx);
} finally {
if (pres != null) pres.dispose();
}