using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace CartesianChartXF_1171097.Portable
{
    public class ViewModel
    {
        public ViewModel()
        {
            this.CategoricalData = GetCategoricalData();
        }

        public ObservableCollection<CategoricalData> CategoricalData { get; set; }

        public static ObservableCollection<CategoricalData> GetCategoricalData()
        {
            var data = new ObservableCollection<CategoricalData>
            {
                new CategoricalData { Category = "A", Value = 0.63 },
                new CategoricalData { Category = "B", Value = 0.85 },
                new CategoricalData { Category = "C", Value = 0.75 },
                new CategoricalData { Category = "D", Value = 0.96 },
                new CategoricalData { Category = "E", Value = 0.78 },
            };

            return data;
        }
    }

    public class CategoricalData
    {
        public object Category { get; set; }

        public double Value { get; set; }
    }

    public class GradientBarEffect : RoutingEffect
    {
        public const string YourCompanyName = "YourCompanyName";
        public const string GradientBarEffectName = "GradientBarEffect";

        internal const string EffectId = YourCompanyName + "." + GradientBarEffectName;

        public Color StartColor { get; set; }
        public Color EndColor { get; set; }

        public GradientBarEffect()
            : base(EffectId)
        {
        }
    }
}

