Change chart management chart type in ASP.NET 4

How to change the chart type of a chart control in ASP.NET 4. I have a drop-down list containing the name of all chart types.

This is the code I came up with:

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { Chart2.Series["Series1"].ChartType = (SeriesChartType) Enum.Parse(typeof(SeriesChartType),DropDownList1.SelectedValue); } 
+4
source share
2 answers

You may need to call DataBind () on the chart to get it to restart.

(If this is a problem).

0
source

Here is an example, but not using asp.net chart management, and merge charts instead.

http://liberofusioncharts.codeplex.com/wikipage?title=AJAX%20sample&referringTitle=Documentation

0
source

Source: https://habr.com/ru/post/1342518/


All Articles