How to change chart type from Line to Bar

How to change chart type from Line to Bar without recreate the chart.

1 Reply

AD Administrator Syncfusion Team February 2, 2007 10:47 AM UTC

Hi,

Thank You for your interest in Syncfusion Products.

You can change the Line Chart in to a Bar Chart without recreating the chart by changing the ChartSeriesType of the Series added to the ChartControl under any button_Click event as shown in the code snippet below,

private void buttonBarSeries_Click(object sender, System.EventArgs e)
{
//changes the SeriesType to Bar.
this.chartControl1.Series[0].Type=ChartSeriesType.Bar;
}

Also kindly take a look at the attached sample to get the above points in clear.

Let me know if you have any queries.

Thanks & Regards,
Ramya.


LineToBarChart.zip

Loader.
Up arrow icon