Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing a horizontal bar chart to a vertical one

I'm using the'System.Windows.Forms.DataVisualization.Charting' library for my chart and I was wondering if anyone figured out how to switch the axes to display the chart vertically

Thanks.

alt text

like image 437
alhazen Avatar asked Mar 03 '10 20:03

alhazen


People also ask

How do you change a chart from vertical to horizontal?

Change the way that data is plotted Click anywhere in the chart that contains the data series that you want to plot on different axes. This displays the Chart Tools, adding the Design, Layout, and Format tabs. On the Design tab, in the Data group, click Switch Row/Column.

How do you reverse a horizontal bar graph?

Go to the Chart Elements drop down list and pick Vertical (Value) Axis. Click the Format Selection button to see the Format Axis window. On the Format Axis window tick the Values in reverse order checkbox.


1 Answers

Changed

myChart.Series["mySeries"].ChartType = SeriesChartType.Bar;

to

myChart.Series["mySeries"].ChartType = SeriesChartType.Column;
like image 162
alhazen Avatar answered Sep 23 '22 00:09

alhazen