private void InitSecondChart()
        {
            WvlLogger.Log(LogType.TraceAll, "InitSecondChart()");

            var xAxis = new NumericAxis(this)
            {
                AutoRange          = AutoRange.Always,
                DrawMajorBands     = false,
                DrawLabels         = false,
                DrawMajorTicks     = false,
                DrawMinorTicks     = false,
                DrawMajorGridLines = false,
                DrawMinorGridLines = false,
                FlipCoordinates    = true,
                AxisAlignment      = AxisAlignment.Left
            };

            var yAxis = new NumericAxis(this)
            {
                DrawMajorBands     = false,
                DrawLabels         = false,
                DrawMajorTicks     = false,
                DrawMinorTicks     = false,
                DrawMajorGridLines = false,
                DrawMinorGridLines = false,
                FlipCoordinates    = true,
                AxisAlignment      = AxisAlignment.Bottom,
                VisibleRange       = new DoubleRange(height / 2, height),
            };

            // from XF sample

            /*
             * var rs = new FastUniformHeatmapRenderableSeries
             * {
             *  DataSeries = heatmapSeries,
             *  ColorMap = new SciChart.Charting.Visuals.RenderableSeries.ColorMap(
             *      new int[] { Color.Transparent, Color.DarkBlue, Color.Purple, Color.Red, Color.Yellow, Color.White },
             *      new float[] { 0f, 0.2f, 0.4f, 0.6f, 0.8f, 1f }
             *  )
             * };
             */

            // from Android sample
            var rs = new FastUniformHeatmapRenderableSeries
            {
                DataSeries = heatmapSeries,
                Maximum    = 30,
                Minimum    = -40,
                ColorMap   = new SciChart.Charting.Visuals.RenderableSeries.ColorMap(
                    new int[] { Color.Transparent, Color.DarkBlue, Color.Purple, Color.Red, Color.Yellow, Color.White },
                    new float[] { 0f, 0.0001f, 0.25f, 0.50f, 0.75f, 1f }
                    )
            };

            #region Zoom and Pan

            // Create interactivity modifiers
            var pinchZoomModifier = new PinchZoomModifier();
            pinchZoomModifier.SetReceiveHandledEvents(true);

            var zoomPanModifier = new ZoomPanModifier();
            zoomPanModifier.SetReceiveHandledEvents(true);

            var zoomExtentsModifier = new ZoomExtentsModifier();
            zoomExtentsModifier.SetReceiveHandledEvents(true);

            var yAxisDragModifier = new YAxisDragModifier();
            yAxisDragModifier.SetReceiveHandledEvents(true);

            // Create modifier group from declared modifiers
            var modifiers = new ModifierGroup(pinchZoomModifier, zoomPanModifier, zoomExtentsModifier, yAxisDragModifier);

            #endregion

            using (HeatmapSurface.SuspendUpdates())
            {
                HeatmapSurface.XAxes.Add(xAxis);
                HeatmapSurface.YAxes.Add(yAxis);
                HeatmapSurface.RenderableSeries.Add(rs);
                //HeatmapSurface.ChartModifiers.Add(modifiers);
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our chart from the layout resource,
            var chart = FindViewById <SciChartSurface>(Resource.Id.Chart);

            // Create a numeric X axis
            var xAxis = new NumericAxis(this)
            {
                AxisTitle = "Number of Samples (per Series)"
            };

            // Create a numeric Y axis
            var yAxis = new NumericAxis(this)
            {
                AxisTitle    = "Value",
                VisibleRange = new DoubleRange(-1, 1)
            };

            // Add xAxis to the XAxes collection of the chart
            chart.XAxes.Add(xAxis);

            // Add yAxis to the YAxes collection of the chart
            chart.YAxes.Add(yAxis);

            // Create XyDataSeries to host data for our chart
            var lineData = new XyDataSeries <double, double>()
            {
                SeriesName = "Sin(x)"
            };
            var scatterData = new XyDataSeries <double, double>()
            {
                SeriesName = "Cos(x)"
            };

            // Append data which should be drawn
            var timer = new Timer(30)
            {
                AutoReset = true
            };

            // Update on each tick of timer
            timer.Elapsed += (s, e) =>
            {
                using (chart.SuspendUpdates())
                {
                    var x = lineData.Count;
                    lineData.Append(x, Math.Sin(x * 0.1));
                    scatterData.Append(x, Math.Cos(x * 0.1));

                    // zoom series to fit viewport size into XAxis direction
                    chart.ZoomExtentsX();
                }
            };

            timer.Start();

            var lineSeries = new FastLineRenderableSeries()
            {
                DataSeries  = lineData,
                StrokeStyle = new SolidPenStyle(Color.LightBlue, 2)
            };

            // Create scatter series with data appended into scatterData
            var scatterSeries = new XyScatterRenderableSeries()
            {
                DataSeries  = scatterData,
                PointMarker = new EllipsePointMarker()
                {
                    Width       = 10,
                    Height      = 10,
                    StrokeStyle = new SolidPenStyle(Color.Green, 2),
                    FillStyle   = new SolidBrushStyle(Color.LightBlue)
                }
            };

            // Add the renderable series to the RenderableSeries collection of the chart
            chart.RenderableSeries.Add(lineSeries);
            chart.RenderableSeries.Add(scatterSeries);

            // Create interactivity modifiers
            var pinchZoomModifier = new PinchZoomModifier();

            pinchZoomModifier.SetReceiveHandledEvents(true);

            var zoomPanModifier = new ZoomPanModifier();

            zoomPanModifier.SetReceiveHandledEvents(true);

            var zoomExtentsModifier = new ZoomExtentsModifier();

            zoomExtentsModifier.SetReceiveHandledEvents(true);

            var yAxisDragModifier = new YAxisDragModifier();

            yAxisDragModifier.SetReceiveHandledEvents(true);

            // Create and configure legend
            var legendModifier = new LegendModifier(this);

            legendModifier.SetLegendPosition(GravityFlags.Bottom | GravityFlags.CenterHorizontal, 10);
            legendModifier.SetOrientation(Orientation.Horizontal);

            // Create RolloverModifier to show tooltips
            var rolloverModifier = new RolloverModifier();

            rolloverModifier.SetReceiveHandledEvents(true);

            // Create modifier group from declared modifiers
            var modifiers = new ModifierGroup(pinchZoomModifier, zoomPanModifier, zoomExtentsModifier, yAxisDragModifier, rolloverModifier, legendModifier);

            // Add the interactions to the ChartModifiers collection of the chart
            chart.ChartModifiers.Add(modifiers);
        }
        private void InitChart(SciChartSurface chart)
        {
            // Create a numeric X axis
            var xAxis = new NumericAxis(this)
            {
                AxisTitle = "Number of Samples (per Series)"
            };

            // Create a numeric Y axis
            var yAxis = new NumericAxis(this)
            {
                AxisTitle    = "Value",
                VisibleRange = new DoubleRange(-1, 1)
            };

            // Create a secondary numeric Y Axis
            var secondaryYAxis = new NumericAxis(this)
            {
                AxisTitle     = "Secondary",
                AxisId        = "SecondaryAxis",
                AxisAlignment = AxisAlignment.Left,
                VisibleRange  = new DoubleRange(-2, 2)
            };

            // Create interactivity modifiers
            var pinchZoomModifier = new PinchZoomModifier();

            pinchZoomModifier.SetReceiveHandledEvents(true);

            var zoomPanModifier = new ZoomPanModifier();

            zoomPanModifier.SetReceiveHandledEvents(true);

            var zoomExtentsModifier = new ZoomExtentsModifier();

            zoomExtentsModifier.SetReceiveHandledEvents(true);

            // Create RolloverModifier to show tooltips
            var rolloverModifier = new RolloverModifier();

            rolloverModifier.SetReceiveHandledEvents(true);

            var yAxisDragModifier = new YAxisDragModifier();

            yAxisDragModifier.SetReceiveHandledEvents(true);

            // Create and configure legend
            var legendModifier = new LegendModifier(this);

            legendModifier.SetLegendPosition(GravityFlags.Bottom | GravityFlags.CenterHorizontal, 10);
            legendModifier.SetOrientation(Orientation.Horizontal);

            var modifiers = new ModifierGroup(pinchZoomModifier, zoomPanModifier, zoomExtentsModifier, rolloverModifier,
                                              legendModifier, yAxisDragModifier);

            modifiers.SetReceiveHandledEvents(true);
            modifiers.MotionEventGroup = "SharedEvents";

            // Add xAxis to the XAxes collection of the chart
            chart.XAxes.Add(xAxis);

            // Add yAxis to the YAxes collection of the chart
            chart.YAxes.Add(yAxis);

            // Add secondaryYAxis to the YAxes collection of the chart
            chart.YAxes.Add(secondaryYAxis);

            // Add the interactions to the ChartModifiers collection of the chart
            chart.ChartModifiers.Add(modifiers);
        }