public void CreateFile(string _path, string _url, string _fileName, out string _tag, RadChart _chart) { string _file = _path + "/" + _fileName; _chart.Save(_file, System.Drawing.Imaging.ImageFormat.Png); _tag = ""; _chart.Visible = false; _chart.DataBind(); }
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(); } }