Hi Aspose Support team,
I have have the requirement like create the chart using the pivot table.
1. Earlier i have used the Aspose version 5.0.2.5. That time i created the chart and the value axis format set properly then i have sent few issues (by fourms) to fix. After that i have got the version 7.0.2.2. Now if i used this version, the value axis format is not set properly. For your kind reference i have attached the excel files(Before.xlsx and After.xlsx). I have used the following code to create the chart through pivot table.
obj.ExcelWorkBook.Worksheets["Summary"].Charts.Add(ChartType.BarStacked, 2, 0, 25, 10);
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].PivotSource = "Summary!PivotTable";
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ChartArea.Area.ForegroundColor = Color.White;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].PlotArea.Area.ForegroundColor = Color.White;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].Title.Text = "History";
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ShowLegend = false;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ValueAxis.TickLabels.Rotation = 45;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ValueAxis.TickLabels.Font.IsBold = false;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ValueAxis.TickLabelPosition = TickLabelPositionType.NextToAxis;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ValueAxis.MajorTickMark = TickMarkType.Outside;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].ValueAxis.MinorTickMark = TickMarkType.None;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].CategoryAxis.IsPlotOrderReversed = true;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].CategoryAxis.HasMultiLevelLabels = false;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].CategoryAxis.MajorTickMark = TickMarkType.Inside;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].CategoryAxis.MinorTickMark = TickMarkType.None;
obj.ExcelWorkBook.Worksheets["Summary"].Charts[0].CategoryAxis.TickLabelPosition = TickLabelPositionType.NextToAxis;
2.I need to change the color of the each bar in the stacked bar chart(i am not using NSeries Properties. Series is coming through the Pivot table). In the attahced excel file, i need to change the blue color bar. How to achieve this feature. I have used the above code to create the chart?
Could you please help me how to achieve these features? and provide the sample code.
Awaiting for your response.
Regards,
Saravanan