Example #1
0
        private async void getChart()
        {
            float totEarnings = await firestore.SumEarnings();

            float totOutflows = await firestore.SumOutflows();

            var entries = new[]
            {
                new Entry(totEarnings)
                {
                    Label      = "Entrate",
                    ValueLabel = totEarnings.ToString(),
                    Color      = SKColor.Parse("#68B9C0")
                },
                new Entry(totOutflows)
                {
                    Label      = "Uscite",
                    ValueLabel = totOutflows.ToString(),
                    Color      = SKColor.Parse("#90D585")
                }
            };

            var chart = new LineChart()
            {
                Entries = entries
            };

            this.LineChart.Chart = chart;
        }