Тип или пространство имен "коллекция серий" не удалось найти
Привет нужны пространства имен для SeriesCollection и точки в диаграмме не найдены в моем коде
Что я уже пробовал:
<pre>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Drawing; using System.Drawing.Drawing2D; namespace dotnetpro { public partial class sample1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Chart.TitleBox.Label.Text = "Student Progress"; Chart.Width = 750; Chart.Height = 550; SeriesCollection mySC = Calculate(); Chart.XAxis.Label.Text = "Marks"; Chart.YAxis.Label.Text = "No of Students"; Chart.SeriesCollection.Add(Calculate()); Chart.DefaultSeries.DefaultElement.URL = "JavaScript: myAlert(\'Clicked on element %Name in series %SeriesName \')"; Chart.TitleBox.Position = TitleBoxPosition.Full; Chart.TitleBox.Label.Font = new Font("TimesRoman", 10, FontStyle.Bold | FontStyle.Italic); Chart.TitleBox.Label.Alignment = StringAlignment.Center; Chart.TitleBox.Label.Color = Color.DarkBlue; Chart.TitleBox.Background.Color = Color.FromArgb(225, 122, 212); Chart.TitleBox.Padding = 7; Chart.LegendBox.DefaultEntry.LabelStyle.Font = new Font("Arial", 10, FontStyle.Italic); Chart.LegendBox.Line.Color = Color.FromArgb(56, 66, 177); Chart.LegendBox.Line.Width = 2; Chart.LegendBox.Background = new Background(Color.FromArgb(165, 174, 255), Color.FromArgb(233, 235, 240), 45); Chart.LegendBox.Orientation = dotnetCHARTING.Orientation.Bottom; } SeriesCollection Calculate() { SeriesCollection SC = new SeriesCollection(); Random myR = new Random(1); for (int a = 0; a < 4; a++) { Series s = new Series(); s.Name = "Series " + a.ToString(); for (int b = 0; b < 1; b++) { Element e = new Element(); e.Name = "Element " + b.ToString(); e.YValue = myR.Next(50); s.Elements.Add(e); } SC.Add(s); } SC[0].Element.Color = Color.FromArgb(49, 255, 49); SC[0].Elements[0].Name = "English"; SC[0].LegendEntry.Value = "13"; SC[0].LegendEntry.Name = "Between 10-15"; SC[1].Element.Color = Color.FromArgb(255, 255, 0); SC[1].Elements[0].Name = "Maths"; SC[1].LegendEntry.Value = "32"; SC[1].LegendEntry.Name = "Between 10-40"; SC[2].Element.Color = Color.FromArgb(255, 99, 49); SC[2].Elements[0].Name = "Science"; SC[2].LegendEntry.Value = "6"; SC[2].LegendEntry.Name = "Between 0-10"; SC[3].Element.Color = Color.FromArgb(0, 156, 255); SC[3].Elements[0].Name = "Computer"; SC[3].LegendEntry.Value = "18"; SC[3].LegendEntry.Name = "Between 15-30"; return SC; } } }