Ejemplo n.º 1
0
        public async void GenerateGraph()
        {
            Top5Generator  gen = new Top5Generator();
            BikeGraphModel bg  = await gen.GenerateNeighbourhoods();

            chart.Series.Add(new ColumnSeries()
            {
                ItemsSource       = bg.model,
                XBindingPath      = "Name",
                YBindingPath      = "BikeContainerCount",
                EnableAnimation   = true,
                AnimationDuration = 3.0,
                EnableTooltip     = true,
            });
        }
Ejemplo n.º 2
0
        public async void GenerateGraph2()
        {
            Project4Bicycle.Top5Generator         gen = new Project4Bicycle.Top5Generator();
            Project4Bicycle.Models.BikeGraphModel bg  = await gen.GenerateNeighbourhoods();

            List <string> neighbourhood = new List <string>();

            List <int> amount = new List <int>();

            for (var i = 0; i < bg.model.Count; i++)
            {
                Project4Bicycle.Models.Neighbourhood tt = bg.model[i];
                neighbourhood.Add(tt.Name);
                amount.Add(tt.BikeContainerCount);
            }

            chart1.Series[0].Points.DataBindXY(neighbourhood, amount);
            chart1.Series[0].Name = "Bike Containers";
        }