Stacked Column Chart Using Oxyplot and Xamarin
<p>I've been using OxyPlot in my Xamarin.ios And Xamarin.Android projects to plot columns charts.This is how I've drawn the column chart using oxyplot.</p>

<p>Now I need a stacked column chart. I could't find it in the documentation. Is it possible with oxyplot? How? Any help is appreciated..</p>

<pre><code>public class MeasurementGraph 
{

    public PlotModel VitalModel { get; set; }
    public VitalGraph graph { get; set; }

    public MeasurementGraph (VitalGraph graph)
    {
        this.graph = graph;
        var model = new PlotModel { Title = "" };
        model.PlotAreaBorderColor = OxyColors.Transparent;

        model.Axes.Add (GetXAxis ());
        model.Axes.Add (GetYAxis ());
        model.Series.Add (GetValueSeries ());

        if (Math.Abs (graph.trendStart) &gt; float.Epsilon &amp;&amp; Math.Abs (graph.trendEnd) &gt; float.Epsilon)
            model.Series.Add (GetXtraSeries ());
            VitalModel = model;
        }

    CategoryAxis GetXAxis ()
    {
        int fontSize;
        if (Math.Abs (graph.trendStart) &gt; float.Epsilon)
            fontSize = 6;
        else
            fontSize = 8;
        CategoryAxis categoryAxis = new CategoryAxis () {
            Position = AxisPosition.Bottom,
            MinorTickSize = 0,
            MajorTickSize = 0,
            MajorGridlineStyle = LineStyle.None,
            MinorGridlineStyle = LineStyle.None,
            FontSize = fontSize,
            IsPanEnabled = false,
            IsZoomEnabled = false,
        };

        foreach (string day in graph.dayList)
            categoryAxis.ActualLabels.Add (day);
        return categoryAxis;
    }

    LinearAxis GetYAxis ()
    {
        List&lt;float&gt; valueList = graph.valueList.Select (x =&gt; float.Parse (x)).ToList ();
        float maxValue = valueList.Max ();

        float minValue = valueList.Max ();


            return new LinearAxis () {
                AxislineStyle = LineStyle.None,
                Position = AxisPosition.Left,
                MinorTickSize = 0,
                MajorTickSize = 0,
                MajorGridlineStyle = LineStyle.Solid,
                MajorGridlineColor = OxyColor.Parse ("#f5f5f5"),
                MinorGridlineStyle = LineStyle.None,
                Maximum = maxValue,
                Minimum = minValue,
                FontSize = 8,
                MajorStep = (maxValue - minValue) / 4,
                IsPanEnabled = false,
                IsZoomEnabled = false

            };
        }

        ColumnSeries GetValueSeries ()
        {
            var series = new ColumnSeries ();
            series.ColumnWidth = 50;
            for (int i = 0; i &lt; graph.valueList.Count; i++) {
                series.Items.Add (new ColumnItem {
                    Value = double.Parse (graph.valueList [i]),
                    Color = OxyColor.Parse (graph.colorList [i])
                });
            }
            return series;
        }

        LineSeries GetXtraSeries ()
        {
            var series = new LineSeries {
                StrokeThickness = 2,
                MarkerType = MarkerType.None,
                MarkerSize = 4,
                MarkerStroke = OxyColors.White,
                MarkerStrokeThickness = 2,
                Color = OxyColors.Blue
            };
            int xStart = graph.vitalId == 20 ? 0 : -1;
            int xEnd = graph.vitalId == 20 ? graph.valueList.Count - 1 : graph.valueList.Count;

            series.Points.Add (new DataPoint (xStart, graph.trendStart));
            series.Points.Add (new DataPoint (xEnd, graph.trendEnd));
            return series;
        }
    }
</code></pre>