Chart is not working

May 18, 2013 at 7:45 PM
I got the source code all other document sample worked except charts.

After spending few hours found the issue.
I am using 2013 word i am not sure issue is because of 2013.

Here is the change in Line3dExChart .UpdateChart function change
/// <param name="sheetName">Name of the sheet.</param>
    protected override void UpdateChart(OpenXmlCompositeElement chart, string sheetName)
        if (chart != null)
//Get the position where LineChartSeries needs to be inserted.
            var nextSibiling=chart.Descendants<LineChartSeries>().Last().NextSibling();

            // Index 0 is for category axis data
            for (int index = 1; index < chartData.columnNameToSeries.Count(); index++)
                string columnName = GetExcelColumnName(index);
//Insert before dataLabels order is important
                LineChartSeries lineChartSeries = chart.InsertBefore(new LineChartSeries(),nextSibiling);
//Add index
__ Index index1 = new Index() { Val = Convert.ToUInt32(index) };
//Add Order
                Order order1 = new Order() { Val = Convert.ToUInt32(index) };