Regarding line chart

Hi team,

Could you please provide me a stacked column chart with sample data.

Thanks & Regards
Asad Anwar

Hi Asad,

Thanks for your inquiry. Please try using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Add chart with default data. You can specify different chart types and sizes.
Shape shape = builder.InsertChart(ChartType.ColumnStacked, 432, 252);
// Chart property of Shape contains all chart related options.
Chart chart = shape.Chart;
// Get chart series collection.
ChartSeriesCollection seriesColl = chart.Series;
// Check series count.
Console.WriteLine(seriesColl.Count);
// Delete default generated series.
seriesColl.Clear();
// Create category names array, in this example we have two categories.
string[] categories = new string[] { "AW Category 1", "AW Category 2" };
// Adding new series. Please note, data arrays must not be empty and arrays must be the same size.
seriesColl.Add("AW Series 1", categories, new double[] { 1, 2 });
seriesColl.Add("AW Series 2", categories, new double[] { 3, 4 });
seriesColl.Add("AW Series 3", categories, new double[] { 5, 6 });
seriesColl.Add("AW Series 4", categories, new double[] { 7, 8 });
seriesColl.Add("AW Series 5", categories, new double[] { 9, 10 });
doc.Save(MyDir + @"16.6.0.docx");

Hope, this helps.

Best regards,

Hi Awais,
I want to add chart axis title but I unable to do it in word chart.
Could you please send me some link so i can do it easily.

Regards
Asad

Hi Asad,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested features at the moment. Your request has been linked to the appropriate issue (WORDSNET-13933) and you will be notified as soon as it is available. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-13933) have been fixed in this Aspose.Words for .NET 23.9 update also available on NuGet.