Hi ASPOSE,
We’re using ASPOSE slides.
Can you let me know how to format the border for markers of a Aspose.Slides.Charts.ChartType.ScatterWithMarkers chart.
I have some codes to set the marker, but cannot find anything about border
Aspose.Slides.Charts.IChartSeries series;
series.DataPoints.AddDataPointForScatterSeries(fact.GetCell(defaultWorksheetIndex, 1, i, dataValues[i, 0]), fact.GetCell(defaultWorksheetIndex, 2, i, dataValues[i, 1]));
series.Type = Aspose.Slides.Charts.ChartType.ScatterWithMarkers;
series.Marker.Symbol = Aspose.Slides.Charts.MarkerStyleType.Square;
series.Marker.Size = 4;
series.Marker.Format.Fill.FillType = FillType.Solid;
Thanks,
Hi,
I have observed the requirements shared by you and suggest you to please try using following sample code on your end to serve the purpose. I hope the shared information will be helpful.
public static void TestScatter()
{
Presentation pres = new Presentation();
ISlide slide = pres.Slides[0];
// Creating the default chart
IChart chart = slide.Shapes.AddChart(ChartType.ScatterWithMarkers, 0, 0, 400, 400);
// Getting the default chart data worksheet index
int defaultWorksheetIndex = 0;
// Getting the chart data worksheet
IChartDataWorkbook fact = chart.ChartData.ChartDataWorkbook;
// Delete demo series
chart.ChartData.Series.Clear();
// Add new series
chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 1, 1, “Series 1”), chart.Type);
// Take first chart series
IChartSeries series = chart.ChartData.Series[0];
// Add new point (1:3) there.
series.DataPoints.AddDataPointForScatterSeries(fact.GetCell(defaultWorksheetIndex, 2, 1, 1), fact.GetCell(defaultWorksheetIndex, 2, 2, 3));
// Add new point (2:10)
series.DataPoints.AddDataPointForScatterSeries(fact.GetCell(defaultWorksheetIndex, 3, 1, 2), fact.GetCell(defaultWorksheetIndex, 3, 2, 10));
// Edit the type of series
series.Type = ChartType.ScatterWithStraightLinesAndMarkers;
// Changing the chart series marker
series.Marker.Size = 20;
series.Marker.Symbol = MarkerStyleType.Square;
series.Marker.Format.Fill.FillType = FillType.Solid;
series.Marker.Format.Fill.SolidFillColor.Color = Color.Blue;
series.Marker.Format.Line.FillFormat.FillType = FillType.Solid;
series.Marker.Format.Line.FillFormat.SolidFillColor.Color = Color.Red;
pres.Save(“C:\Aspose Data\AsposeChart_out.pptx”, SaveFormat.Pptx);
}
Please share, if I may help you further in this regard.
Many Thanks,