private SCIXyScatterRenderableSeries GetScatterRenderableSeries(ISCIPointMarkerProtocol pointMarker, uint color, bool negative) { var seriesName = pointMarker is SCIEllipsePointMarker ? negative ? "Negative Ellipse" : "Positive Ellipse" : negative ? "Negative" : "Positive"; var dataSeries = new XyDataSeries <int, double> { SeriesName = seriesName }; for (var i = 0; i < 200; i++) { var time = i < 100 ? GetRandom(_random, 0, i + 10) / 100 : GetRandom(_random, 0, 200 - i + 10) / 100; var y = negative ? -time * time * time : time * time * time; dataSeries.Append(i, y); } pointMarker.Height = 6; pointMarker.Width = 6; pointMarker.StrokeStyle = new SCISolidPenStyle(UIColor.White, 0.1f); pointMarker.FillStyle = new SCISolidBrushStyle(color); var renderSeries = new SCIXyScatterRenderableSeries { DataSeries = dataSeries, Style = { PointMarker = pointMarker }, }; var animation = new SCIWaveRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOut); animation.StartAfterDelay(0.3f); renderSeries.AddAnimation(animation); return(renderSeries); }
protected override void InitExample() { var xAxis = new SCINumericAxis(); var yAxis = new SCINumericAxis(); var fourierSeries = DataManager.Instance.GetFourierSeries(1.0, 0.1, 5.0, 5.15); var dataSeries0 = new HlDataSeries <double, double>(); var dataSeries1 = new HlDataSeries <double, double>(); FillDataSeries(dataSeries0, fourierSeries, 1.0); FillDataSeries(dataSeries1, fourierSeries, 1.3); const uint color = 0xFFC6E6FF; var strokeStyle = new SCISolidPenStyle(0xFFC6E6FF.ToColor(), 1f); var errorBars0 = new SCIFastErrorBarsRenderableSeries { DataSeries = dataSeries0, StrokeStyle = strokeStyle, ErrorDirection = SCIErrorBarDirection.Vertical, ErrorType = SCIErrorBarType.Absolute }; errorBars0.AddAnimation(new SCIScaleRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOutElastic)); var lineSeries = new SCIFastLineRenderableSeries { DataSeries = dataSeries0, StrokeStyle = strokeStyle, PointMarker = new SCIEllipsePointMarker { FillStyle = new SCISolidBrushStyle(color), Width = 5, Height = 5 } }; lineSeries.AddAnimation(new SCIScaleRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOutElastic)); var errorBars1 = new SCIFastErrorBarsRenderableSeries { DataSeries = dataSeries1, StrokeStyle = strokeStyle, DataPointWidth = 0.7f, ErrorDirection = SCIErrorBarDirection.Vertical, ErrorType = SCIErrorBarType.Absolute }; errorBars1.AddAnimation(new SCIScaleRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOutElastic)); var scatterSeries = new SCIXyScatterRenderableSeries { DataSeries = dataSeries1, PointMarker = new SCIEllipsePointMarker { FillStyle = new SCISolidBrushStyle(ColorUtil.Transparent), StrokeStyle = strokeStyle, Width = 7, Height = 7 } }; scatterSeries.AddAnimation(new SCIScaleRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOutElastic)); using (Surface.SuspendUpdates()) { Surface.XAxes.Add(xAxis); Surface.YAxes.Add(yAxis); Surface.RenderableSeries = new SCIRenderableSeriesCollection { errorBars0, lineSeries, errorBars1, scatterSeries }; Surface.ChartModifiers = new SCIChartModifierCollection { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }; } }