public ProjectedPoint(SeriesProjection projection, DataSeriesRow row, float x, float y) { X = x; Y = y; m_Row = row; m_Projection = projection; Z = (float)ProjectedPoint.Rand.NextDouble(); }
public List <ProjectedPoint> getXYValues(SeriesProjection projection, string ColumnXName, string ColumnYName) { var query = from row in m_Rows //orderby row[ColumnXName], row[ColumnYName] //where !(row[ColumnXName]==0 && row[ColumnYName]==0) select new ProjectedPoint(projection, row, (row[ColumnXName]), (row[ColumnYName])); return(new List <ProjectedPoint>(query)); }
public SplatterModel(List <DataSeries> datas, string dim0N, string dim1N, bool calcColors) { Groups = new Dictionary <string, ISeriesProjection>(); Series = new Dictionary <string, SeriesProjection>(); dim0Name = dim0N; dim1Name = dim1N; xmax = float.MinValue; xmin = float.MaxValue; ymax = float.MinValue; ymin = float.MaxValue; showAllPoints = true; for (int i = 0; i < datas.Count; i++) { SeriesProjection sp = new SeriesProjection(); sp.Init(datas[i], dim0Name, dim1Name); Series[datas[i].Name] = sp; xmax = Math.Max(xmax, sp.Xmax); xmin = Math.Min(xmin, sp.Xmin); ymax = Math.Max(ymax, sp.Ymax); ymin = Math.Min(ymin, sp.Ymin); } SeriesMemberships = new BindingList <SeriesMembership>(); int j = 0; foreach (var series in Series.Values) { SeriesMemberships.Add(new SeriesMembership(series, j)); j++; } NumberOfGroups = Math.Min(Series.Count, 8); if (NumberOfGroups == Series.Count && !calcColors) { GroupColors = Series.Values.Select(s => s.Color).ToList(); } else { GroupColors = ColorConv.pickIsoCols(74.0f, NumberOfGroups, .5f, (float)Math.PI); } SetGroupMembers(); SeriesMemberships.ListChanged += new ListChangedEventHandler(SeriesMemberships_ListChanged); }
public SeriesMembership(SeriesProjection series, int index) { m_Series = series; Name = series.Name; SetMember(index); }