Changing the Chart Axis

Hi,

Your example: Create and Manage Chart|Documentation

It draws custom charts i.e. one type of chart is column and other is Line chart. When we click on a column bar chart from it, it shows that the series are considered columnwise for data in sheet. How can we switch the axis so that charts are drawn for horizontal data? I hope you can understand what I mean.

@Acton,

Thanks for providing us some details.

As I understand from your query, I think you want to specify the source data for different chart series row by row. You may put “false” for the “isVertical” Boolean parameter in SeriesCollection.Add method. See the sample line of code for your reference:
e.g
Sample code:

// Adding NSeries (chart data source) to the chart ranging from “A1” cell to “B4”
chart.NSeries.Add(“A1:B4”, false);

Hope, this helps a bit.