Cannot animate two series on a stacked bar chart in MonoDroid


#1

If I add two series to a column chart (stacked) with an animation (using MonoDroid) the second series is no longer visible. However if I turn animation off the second series is visable again. What am I doing wrong? Is this a bug?

var series1 = new ColumnSeries
            {
                DataAdapter = dataAdapter,
                Title = "data",
                SeriesSelectionMode = Series.SelectionMode.PointSingle,
                CrosshairEnabled = false,
                AnimationEnabled = ViewModel.AnimateSeries,
                StackId = 0,
                Hidden = false,
                Style =
                {
                    AreaColor = Color.Argb(255, 74, 122, 181),
                    AreaColorGradient = Color.Argb(255, 48, 102, 166),
                    FillStyle = SeriesStyle.FillStyle.Gradient,
                    LineShown = false,
                },
                SelectedStyle =
                {
                    AreaColor = Color.Argb(255, 210, 84, 0),
                    AreaColorGradient = Color.Argb(255, 188, 40, 00),
                    FillStyle = SeriesStyle.FillStyle.Gradient,

                },
                EntryAnimation =
                {
                    XOrigin = -3.0f,
                    YOrigin = 0.0f,
                    Duration = 1,
                    XScaleCurve = new BounceAnimationCurve(),
                    YScaleCurve = new FlatAnimationCurve(),
                },
            };
var series2 = new ColumnSeries
                {
                    DataAdapter = dataAdapter,
                    Title = "background",
                    SeriesSelectionMode = Series.SelectionMode.PointSingle,
                    CrosshairEnabled = false,
                    AnimationEnabled = ViewModel.AnimateSeries,
                    StackId = 0,
                    Hidden = false,
                    Style =
                    {
                        AreaColor = Color.Argb(255, 30, 76, 145),
                        FillStyle = SeriesStyle.FillStyle.Flat,
                        LineShown = false,
                    },
                    EntryAnimation =
                    {
                        XOrigin = -3.0f,
                        YOrigin = 0.0f,
                        Duration = 1,
                        XScaleCurve = new BounceAnimationCurve(),
                        YScaleCurve = new FlatAnimationCurve(),
                    },
                };

#2

For the benefit of anyone coming across this post, this is actually a known bug inĀ  shinobicharts for Android (both Java and Xamarin versions). While we will be looking to include a fix for this in a future release for the time being one workaround you can employ is to add the Series to the chartĀ before adding the Axes. Doing things this way round will ensure that all the Series are visible and animated together.