protected override void InitExampleInternal() { Surface = new SCIChartSurface(_exampleViewLayout.SciChartSurfaceView); StyleHelper.SetSurfaceDefaultStyle(Surface); var ds1Points = DataManager.Instance.GetDampedSinewave(1.0, 0.05, 50, 5); var dataSeries = new XyDataSeries <double, double>(); dataSeries.Append(ds1Points.XData, ds1Points.YData); var axisStyle = StyleHelper.GetDefaultAxisStyle(); var xAxis = new SCINumericAxis { IsXAxis = true, GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle }; var yAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1), Style = axisStyle }; var renderSeries = new SCIFastImpulseRenderableSeries { DataSeries = dataSeries, Style = { LinePen = new SCIPenSolid(UIColor.FromRGB(0x00, 0x66, 0xFF), 0.7f), PointMarker = new SCIEllipsePointMarker { FillBrush = new SCIBrushSolid(UIColor.FromRGB(0x00, 0x66, 0xFF)), BorderPen = new SCIPenSolid(UIColor.FromRGB(0x00, 0x66, 0xFF), 2f), Width = 10, Height = 10 } } }; Surface.AttachAxis(xAxis, true); Surface.AttachAxis(yAxis, false); Surface.AttachRenderableSeries(renderSeries); Surface.ChartModifier = new SCIModifierGroup(new ISCIChartModifierProtocol[] { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }); Surface.InvalidateElement(); }
protected override void InitExample() { var xAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1) }; var yAxis = new SCINumericAxis { GrowBy = new SCIDoubleRange(0.1, 0.1) }; var ds1Points = DataManager.Instance.GetDampedSinewave(1.0, 0.05, 50, 5); var dataSeries = new XyDataSeries <double, double>(); dataSeries.Append(ds1Points.XData, ds1Points.YData); var renderableSeries = new SCIFastImpulseRenderableSeries { DataSeries = dataSeries, StrokeStyle = new SCISolidPenStyle(0xFF0066FF, 2f), PointMarker = new SCIEllipsePointMarker { Width = 7, Height = 7, StrokeStyle = new SCISolidPenStyle(0xFF0066FF, 2f), FillStyle = new SCISolidBrushStyle(0xFF0066FF), } }; var animation = new SCIWaveRenderableSeriesAnimation(3, SCIAnimationCurve.EaseOut); animation.StartAfterDelay(0.3f); renderableSeries.AddAnimation(animation); using (Surface.SuspendUpdates()) { Surface.XAxes.Add(xAxis); Surface.YAxes.Add(yAxis); Surface.RenderableSeries.Add(renderableSeries); Surface.ChartModifiers = new SCIChartModifierCollection { new SCIZoomPanModifier(), new SCIPinchZoomModifier(), new SCIZoomExtentsModifier() }; } }