private void LoadChart(RadChart chart, List<ReportData> dt, string seriesname) { if (dt != null) { chart.DataManager.DataSource = dt; //set the column in the datasource to be used for the labels chart.DataManager.LabelsColumn = "Value"; chart.DataManager.ValuesYColumns = new string[] { "Count" }; //sets the labels so that there are no overlaps chart.IntelligentLabelsEnabled = true; chart.DataBind(); chart.Series[0].Name = seriesname; //the legend will display the labels of the items, instead of the name of the series chart.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.Nothing; chart.Update(); } else { chart.Clear(); chart.Update(); chart.Refresh(); } }
private void ConvertToBar(RadChart chart) { chart.Series[0].Type = Telerik.Charting.ChartSeriesType.Bar; chart.Update(); chart.Refresh(); }