private void OnIntializeDataSetLine(ILineDataSetXF source, LineDataSet original) { OnSettingsLineRadarDataSet(source, original); if (source.IF_GetMode().HasValue) { original.SetMode(GetDrawLineMode(source.IF_GetMode().Value)); } if (source.IF_GetCircleColors() != null && source.IF_GetCircleColors().Count > 0) { original.SetCircleColors(source.IF_GetCircleColors().Select(item => item.ToAndroid().ToArgb()).ToArray()); } if (source.IF_GetCircleHoleColor().HasValue) { original.SetCircleColorHole(source.IF_GetCircleHoleColor().Value.ToAndroid()); } if (source.IF_GetCircleRadius().HasValue) { original.CircleRadius = source.IF_GetCircleRadius().Value; } if (source.IF_GetCircleHoleRadius().HasValue) { original.CircleHoleRadius = source.IF_GetCircleHoleRadius().Value; } if (source.IF_GetCubicIntensity().HasValue) { original.CubicIntensity = source.IF_GetCubicIntensity().Value; } if (source.IF_GetDrawCircles().HasValue) { original.SetDrawCircles(source.IF_GetDrawCircles().Value); } if (source.IF_GetDrawCircleHole().HasValue) { original.SetDrawCircleHole(source.IF_GetDrawCircleHole().Value); } }
/// <summary> /// Adds the points to entries and to line data set /// </summary> private void AddPointsToEntries() { int count = 0; Random rand = new Random(); foreach (KeyValuePair <string, List <DataPoint> > dp in mCurVisData.Points) { this.mEntries = new List <Entry>(); mColors = new List <int>(); Color col = new Color(rand.NextInt(255), rand.NextInt(255), rand.NextInt(255)); foreach (DataPoint dp2 in dp.Value) { mEntries.Add(new Entry(dp2.X, dp2.Y)); if (mCurVisData.AltControlTime.Any(x => x == dp2.X)) { mColors.Add(Color.Black); } else { mColors.Add(col); } } LineDataSet lds = new LineDataSet(mEntries, dp.Key); lds.SetColor(col, 255); // lds.SetColors(mColors.ToArray()); lds.SetCircleColors(mColors.ToArray()); // lds.SetCircleColor(mColorList[count]); lds.SetDrawCircleHole(true); lds.SetCircleColorHole(col); mDataSet.SetValue(lds, count); count++; } }