private void ButtonClustering_Click(object sender, RoutedEventArgs e) { TextBoxLog.Clear(); try { AlgorithmKMeans alg = new AlgorithmKMeans(clusterData, int.Parse(TextBoxNumberOfClusters.Text)); alg.DistanceFunction = GetDistanceFunction(); alg.MaxIterations = int.Parse(TextBoxMaximumIterations.Text); alg.Iteration += Alg_Iteration; alg.Run(); PointChart.Data = clusterData; PointChart.Draw(); DataGridClusterStats.ItemsSource = clusterData.GetClusterStatistics(); } catch (NullReferenceException) { WPFMessageBox.MsgError("Empty dataset, please load a datafile."); } catch (InvalidOperationException) { WPFMessageBox.MsgError("An empty cluster created. Please run algorithm once more. The value of K is too big?"); } catch (Exception ex) { WPFMessageBox.MsgError("An error occured!", ex); } }
protected override void OnAppearing() { base.OnAppearing(); var entries = new[] { new Microcharts.Entry(20) { Label = "January", ValueLabel = "20", Color = SKColor.Parse("#266489") }, new Microcharts.Entry(15) { Label = "February", ValueLabel = "15", Color = SKColor.Parse("#68B9C0") }, new Microcharts.Entry(33) { Label = "March", ValueLabel = "33", Color = SKColor.Parse("#90D585") }, new Microcharts.Entry(12) { Label = "April", ValueLabel = "12", Color = SKColor.Parse("#90B585") }, new Microcharts.Entry(40) { Label = "May", ValueLabel = "40", Color = SKColor.Parse("#91D585") } }; var chart4 = new PointChart() { Entries = entries, LabelTextSize = 35 }; var chart5 = new RadialGaugeChart() { Entries = entries, LabelTextSize = 35 }; var chart6 = new RadarChart() { Entries = entries, LabelTextSize = 35 }; this.chart4.Chart = chart4; this.chart5.Chart = chart5; this.chart6.Chart = chart6; ProcessStatusChartBuild(); ProcessSucceededChartBuild(); MonthlyHiringsChartBuild(); }
private void LoadFile() { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "CSV files (*.csv)|*.csv|TXT files (*.txt)|*.txt"; if (dlg.ShowDialog() == true) { clusterData = new ClusterData(); ClusterDataReader dr = ClusterDataReaderFactory.GetClusterDataReader(dlg.FileName, clusterData); if (dr == null) { WPFMessageBox.MsgError("Hiba történt a file betöltése során!"); return; } TextBlockFileName.Text = dlg.FileName; GridAllStatistics.DataContext = clusterData; GridXStatistics.DataContext = clusterData; GridYStatistics.DataContext = clusterData; clusterData.NormalizePoints(); PointChart.Data = clusterData; PointChart.Draw(); } }
private void ShowCharts() { Chart chart = null; foreach (var item in Dashboards) { switch (item.Type) { case EChartType.BarChart: chart = new BarChart { Entries = GetEntries(item) }; break; case EChartType.PointChart: chart = new PointChart { Entries = GetEntries(item) }; break; case EChartType.LineChart: chart = new LineChart { Entries = GetEntries(item) }; break; case EChartType.DonutChart: chart = new DonutChart { Entries = GetEntries(item) }; break; case EChartType.RadialGaugeChart: chart = new RadialGaugeChart { Entries = GetEntries(item) }; break; case EChartType.RadarChart: chart = new RadarChart { Entries = GetEntries(item) }; break; default: break; } if (chart == null) { continue; } var chartView = new Microcharts.Forms.ChartView { HeightRequest = 140, BackgroundColor = Color.White }; chartView.Chart = chart; lsCharts.Children.Add(chartView); } }
private void SetupPressureCharts() { AveragePressureChart = new PointChart() { Entries = averagePressureEntries, BackgroundColor = SKColor.Parse(ThemeHelper.GetThemeColor("pageBackgroundColor").ToHex()), LabelTextSize = 32, LabelOrientation = Orientation.Horizontal, ValueLabelOrientation = Orientation.Horizontal, PointSize = 20, Margin = 20 }; MinPressureChart = new LineChart() { Entries = minPressureEntries, BackgroundColor = SKColor.Parse(Color.Transparent.ToHex()), LabelTextSize = 32, LabelOrientation = Orientation.Horizontal, ValueLabelOrientation = Orientation.Horizontal, LineSize = 8, Margin = 20 }; MaxPressureChart = new LineChart() { Entries = maxPressureEntries, BackgroundColor = SKColor.Parse(Color.Transparent.ToHex()), LabelTextSize = 32, LabelOrientation = Orientation.Horizontal, ValueLabelOrientation = Orientation.Horizontal, LineSize = 8, Margin = 20 }; }
private void Generate() { List <Microcharts.Entry> entries = new List <Microcharts.Entry>(); for (int i = 0; i < rand.Next(3, 8); i++) { var res = rand.Next(10, 401); entries.Add(new Microcharts.Entry(res) { Label = i.ToString(), ValueLabel = res.ToString(), Color = SkiaSharp.SKColor.Parse(GetRandomColour()) }); } int choice = rand.Next(5); switch (choice) { case 0: ChartView = new PointChart() { Entries = entries }; break; case 1: ChartView = new BarChart() { Entries = entries }; break; case 2: ChartView = new DonutChart() { Entries = entries }; break; case 3: ChartView = new RadialGaugeChart() { Entries = entries }; break; case 4: ChartView = new LineChart() { Entries = entries }; break; } MessagingCenter.Send(ChartView, "NewChartAvaliable"); }
protected override void OnAppearing() { base.OnAppearing(); var entries = new[] { new Microcharts.Entry(15) { Label = "UWP", ValueLabel = "20", Color = SKColor.Parse("#2c3e50") }, new Microcharts.Entry(50) { Label = "Android", ValueLabel = "50", Color = SKColor.Parse("#77d065") }, new Microcharts.Entry(30) { Label = "iOS", ValueLabel = "30", Color = SKColor.Parse("#b455b6") }, new Microcharts.Entry(15) { Label = "Shared", ValueLabel = "15", Color = SKColor.Parse("#3498db") } }; var chart = new LineChart() { Entries = entries, }; this.charView.Chart = chart; var chart2 = new BarChart() { Entries = entries, }; this.charView2.Chart = chart2; var chart3 = new PointChart() { Entries = entries, }; this.charView3.Chart = chart3; }
public AdministratorViewModel(IProductItemDataStore productItemDataStore) { _ProductDataStore = productItemDataStore; //GetPhotoCommand = new Command() NewItem = new ProductItem(); Data = new List <Entry>(); StoreItems = new ObservableCollection <ProductItem>(); StoreItems = GetData(); Entry TotalAvailable = new Entry(ItemsAvailble(StoreItems)) { Color = SkiaSharp.SKColor.Parse("#313d4e"), Label = "Available:" + ItemsAvailble(StoreItems).ToString(), }; Data.Add(TotalAvailable); Entry TotalItems = new Entry(StoreItems.Count) { Color = SkiaSharp.SKColor.Parse("#49D19D"), Label = "Total" + StoreItems.Count.ToString(), }; Data.Add(TotalItems); InventoryChart = new DonutChart() { Entries = Data, LabelTextSize = 50 }; SalesData = GetSalesData(); SalesChart = new PointChart() { Entries = SalesData, }; OrdersItems = new ObservableCollection <Order>(); OrdersItems = GetOrders(); DoneCommand = new Command(async() => await GoAdminHome()); AddCommand = new Command(async() => await AddItem()); UpdateCommand = new Command(async() => await UpdateItem()); }
private void LoadNationalityData(object obj) { var selected = Nationalities.Where((x => x.IsSelected == true)).ToArray(); var entries = this.AppLogic.GetUserByNationality(selected); NationalitiesChart = new LineChart() { Entries = entries }; NationalitiesPointChart = new PointChart() { Entries = entries }; Navigation.PushNonAwaited <NationalityChartPage>(); }
void DrawChart(string charttype) { List <Entry> DataList = new List <Entry>(); foreach (Diet diet in dietList) { DataList.Add(new Entry(diet.Calories) { Label = diet.Food, ValueLabel = diet.Calories.ToString(), Color = SKColor.Parse("#266489") }); } if (charttype == "PointChart") { var chart = new PointChart() { Entries = DataList, LabelTextSize = 40f }; chartView.Chart = chart; } else if (charttype == "LineChart") { var chart = new LineChart() { Entries = DataList, LabelTextSize = 40f }; chartView.Chart = chart; } else if (charttype == "BarChart") { var chart = new BarChart() { Entries = DataList, LabelTextSize = 40f }; chartView.Chart = chart; } else if (charttype == "RadarChart") { var chart = new RadarChart() { Entries = DataList, LabelTextSize = 40f }; chartView.Chart = chart; } }
public MainWindow() { WpfStandardUIEnvironment.Init(new WpfNativeVisualEnvironment()); InitializeComponent(); MyBarChart.Entries = CreateChartEntries(); MyPointChart.Entries = CreateChartEntries(); #if false var barChart = new BarChart() { Entries = CreateChartEntries(), BackgroundColor = Colors.Blue, LabelColor = Colors.Green, Width = 400, Height = 300, }; controlStack.Children.Add(barChart); var pointChart = new PointChart() { Entries = CreateChartEntries(), BackgroundColor = Colors.Red, LabelColor = Colors.Maroon, Width = 400, Height = 300, }; controlStack.Children.Add(pointChart); #endif #if false var radarChart = new RadarChart() { Entries = CreateChartEntries(), LabelTextSize = 14, IsAnimated = false, Width = 400, Height = 400, }; radarChart.Build(); var radarChartWpf = new StandardUIUserControlWpf(radarChart); radarChartWpf.HorizontalAlignment = HorizontalAlignment.Left; controlStack.Children.Add(radarChartWpf); #endif }
private async Task PollValuesAsync() { await Task.Delay(500); List <Consume> cosumes = cosumeService.GetConsumes(); var entries = cosumes.Select(x => new Microcharts.Entry((float)x.Amount) { Label = ChartHelper.ToWord(x.DataType), ValueLabel = x.Amount.ToString(), Color = ChartHelper.GetRandomColor() }); var _chart = new PointChart(); _chart.Entries = entries; _chart.LabelTextSize = 40; this.Chart = _chart; OnPropertyChanged(nameof(Chart)); }
private void SetPointChart(double maxValue = 100) { Device.BeginInvokeOnMainThread(() => { ChartData = new PointChart() { Entries = Entries, AnimationDuration = AnimationTime, IsAnimated = true, LabelOrientation = Orientation.Horizontal, PointMode = PointMode.Square, ValueLabelOrientation = Orientation.Vertical, MinValue = 0, MaxValue = (float)maxValue, BackgroundColor = ChartBackgroundColor }; }); }
private void TypeOutlay_SelectedIndexChanged(object sender, EventArgs e) { switch (TypeOutlay.SelectedIndex) { case 0: var chart0 = new DonutChart() { Entries = entries }; chart0.LabelTextSize = diagramTextSize; chart0.HoleRadius = 0.3f; this.chartView.Chart = chart0; break; case 1: var chart1 = new RadialGaugeChart() { Entries = entries }; chart1.LabelTextSize = diagramTextSize; this.chartView.Chart = chart1; break; case 2: var chart2 = new PointChart() { Entries = entries }; chart2.LabelTextSize = diagramTextSize; this.chartView.Chart = chart2; break; case 3: var chart3 = new BarChart() { Entries = entries }; chart3.LabelTextSize = diagramTextSize; this.chartView.Chart = chart3; break; } }
/// <summary> /// Method for drawing the charts /// </summary> private void DrawCharts() { // Initialize the charts var barChart = new BarChart() { Entries = mEntries }; mBarChart.Chart = barChart; var pointChart = new PointChart() { Entries = mEntries }; mPointChart.Chart = pointChart; var lineChart = new LineChart() { Entries = mEntries }; mLineChart.Chart = lineChart; var donutChart = new DonutChart() { Entries = mEntries }; mDonutChart.Chart = donutChart; var radialGaugeChart = new RadialGaugeChart() { Entries = mEntries }; mRadialGaugeChart.Chart = radialGaugeChart; var radarChart = new RadarChart() { Entries = mEntries }; mRadarChart.Chart = radarChart; }
public HistoryViewModel(INavigation navigation) { this.navigation = navigation; historyService = ServiceContainer.Resolve <IHistoryService>(); historyService.Updated += HistoryService_Updated; RefreshCommand = new Command(async() => await RefreshHistoryData()); GenderChart = new PieChart() { HoleRadius = .7f, LabelTextSize = 30, Margin = 60 }; AgeChart = new PointChart() { BackgroundColor = SKColor.Empty, PointSize = 20, LabelTextSize = 30 }; }
private Chart DrawBPChart(int maxRecords = 5, bool includeGrid = false) { var bpData = from systolic in Observations join diastolic in Observations on systolic.EffectiveDateTime equals diastolic.EffectiveDateTime where systolic.ValueQuantity.Code.ToLower() == "systolic blood pressure" && diastolic.ValueQuantity.Code.ToLower() == "diastolic blood pressure" orderby diastolic.EffectiveDateTime descending select new { time = systolic.EffectiveDateTime, systolicValue = systolic.ValueQuantity.Value, diastolicValue = diastolic.ValueQuantity.Value, }; var entries = new List <ChartEntry>(); foreach (var point in bpData.Take(maxRecords)) { entries.Add(new ChartEntry(point.systolicValue) { // TODO: Color-code points based on healthy range Color = point.systolicValue < 120 ? SKColor.Parse("#F2A1A5") : SKColor.Parse("#E74E54"), }); entries.Add(new ChartEntry(point.diastolicValue) { Color = point.diastolicValue < 80 ? SKColor.Parse("#F2A1A5") : SKColor.Parse("#E74E54"), }); } // TODO: Need high-lo chart var chart = new PointChart { Entries = entries, }; return(chart); }
void DrawChart(string charttype) { List <Entry> DataList = new List <Entry>(); DataList.Add(new Entry(200) { Label = "January", ValueLabel = "200", Color = SKColor.Parse("#266489") }); DataList.Add(new Entry(300) { Label = "February", ValueLabel = "300", Color = SKColor.Parse("#0ccf40") }); DataList.Add(new Entry(100) { Label = "March", ValueLabel = "100", Color = SKColor.Parse("#eb0e33") }); DataList.Add(new Entry(400) { Label = "May", ValueLabel = "400", Color = SKColor.Parse("#1068eb") }); DataList.Add(new Entry(300) { Label = "June", ValueLabel = "300", Color = SKColor.Parse("#10e7eb") }); DataList.Add(new Entry(400) { Label = "July", ValueLabel = "400", Color = SKColor.Parse("#e3d320") }); DataList.Add(new Entry(150) { Label = "August", ValueLabel = "150", Color = SKColor.Parse("#5430c9") }); if (charttype == "PointChart") { var chart = new PointChart() { Entries = DataList, LabelTextSize = 30f }; chartview.Chart = chart; } else if (charttype == "LineChart") { var chart = new LineChart() { Entries = DataList, LabelTextSize = 30f }; chartview.Chart = chart; } else if (charttype == "DonutChart") { var chart = new DonutChart() { Entries = DataList, LabelTextSize = 30f }; chartview.Chart = chart; } else if (charttype == "BarChart") { var chart = new BarChart() { Entries = DataList, LabelTextSize = 30f }; chartview.Chart = chart; } else if (charttype == "RadarChart") { var chart = new RadarChart() { Entries = DataList, LabelTextSize = 30f }; chartview.Chart = chart; } }
private async void DrawChartAsync(int chartIndex) { await Task.Delay(1000); if (earningList.Count == 0) { return; } var DataEntry = new List <ChartEntry>(); for (int i = Math.Max(earningList.Count - 5, 0); i < earningList.Count; ++i) { DataEntry.Add(new ChartEntry(float.Parse(earningList[i].Fare)) { Label = $"Ride {i + 1}", ValueLabel = earningList[i].Fare, Color = SKColor.Parse(HexConverter()) }); } switch (chartIndex) { case 0: var chartRader = new RadarChart() { Entries = DataEntry, IsAnimated = true, LabelTextSize = textSize }; ChartView.Chart = chartRader; break; case 1: var chartPoint = new PointChart() { Entries = DataEntry, IsAnimated = true, LabelTextSize = textSize }; ChartView.Chart = chartPoint; break; case 2: var chartLine = new LineChart() { Entries = DataEntry, IsAnimated = true, LabelTextSize = textSize }; ChartView.Chart = chartLine; break; default: var chart = new RadarChart() { Entries = DataEntry, IsAnimated = true, LabelTextSize = textSize }; ChartView.Chart = chart; break; } }
private void DrawChart(string type) { var random = new Random(); var color = String.Format("#{0:X6}", random.Next(0x1000000)); NBP nbp = new NBP(); var test = nbp.GetRates("http://api.nbp.pl/api/exchangerates/tables/C/today/"); List <Entry> ent = new List <Entry>(); foreach (var item in test[0].rates) { Entry e = new Entry((float)item.ask) { Label = item.code, ValueLabel = item.ask.ToString(), Color = SKColor.Parse(color = String.Format("#{0:X6}", random.Next(0x1000000))) }; ent.Add(e); } var entries = ent.ToArray(); Chart chart; switch (type) { //case "Bar": default: chart = new BarChart() { Entries = entries }; break; case "Bar": chart = new BarChart() { Entries = entries }; break; case "Point": chart = new PointChart() { Entries = entries }; break; case "Line": chart = new LineChart() { Entries = entries }; break; case "Donut": chart = new DonutChart() { Entries = entries }; break; case "Radial": chart = new RadialGaugeChart() { Entries = entries }; break; case "Radar": chart = new RadarChart() { Entries = entries }; break; } var chartView = FindViewById <ChartView>(Resource.Id.chartView); chartView.Chart = chart; }
//updates LIVE view chart (as new band readings are recieved) private void UpdateChart(int point) { try { if (ChartQueue.Count != NumberOfSamplesPerEntry) { ChartQueue.Add(point); } else { ChartQueue.RemoveAt(0); ChartQueue.Add(point); } List<int> local_queue = new List<int>(); local_queue = ChartQueue.ToList<int>(); PointChart chart = new PointChart() { Entries = local_queue.Select(v => new Entry(v) { Color = colorGraph(v), ValueLabel = v.ToString().Equals(EmptyReading.ToString()) ? " " : v.ToString() }), }; chart.BackgroundColor = SkiaSharp.SKColors.Transparent; List<Entry> entries_radial = new List<Entry> { new Entry((float)avg) { Color = SkiaSharp.SKColors.Transparent }, new Entry(point) { Color = colorGraph(point) } }; RadialGaugeChart chart_radial = new RadialGaugeChart() { Entries = entries_radial }; chart_radial.MaxValue = (int)(avg + System.Math.Sqrt(variance)*2); chart_radial.MinValue = 0; chart_radial.LineAreaAlpha = 0; chart_radial.Margin = 10; chart_radial.BackgroundColor = SkiaSharp.SKColors.Transparent; if (liveUpdate) { RunOnUiThread(() => { currentHB.Text = point.ToString(); txtStatus.Text = ""; chartView.Chart = chart; chartViewPie.Chart = chart_radial; }); } } catch (System.Exception e) { System.Diagnostics.Debug.WriteLine("UpdateChart() exception: "+e.Message); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab); fab.Click += FabOnClick; var entries = new[] { new Entry(200) { Label = "January", ValueLabel = "200", Color = SKColor.Parse("#266489") }, new Entry(400) { Label = "February", ValueLabel = "400", Color = SKColor.Parse("#68B9C0") }, new Entry(-100) { Label = "March", ValueLabel = "-100", Color = SKColor.Parse("#90D585") } }; var chart = new BarChart() { Entries = entries }; var chart1 = new PointChart() { Entries = entries }; var chart2 = new LineChart() { Entries = entries }; var chart3 = new DonutChart() { Entries = entries }; var chart4 = new RadialGaugeChart() { Entries = entries }; var chart5 = new RadarChart() { Entries = entries }; var chartView = FindViewById <ChartView>(Resource.Id.chartView); var chartView1 = FindViewById <ChartView>(Resource.Id.chartView1); var chartView2 = FindViewById <ChartView>(Resource.Id.chartView2); var chartView3 = FindViewById <ChartView>(Resource.Id.chartView3); var chartView4 = FindViewById <ChartView>(Resource.Id.chartView4); var chartView5 = FindViewById <ChartView>(Resource.Id.chartView5); chartView.Chart = chart; chartView1.Chart = chart1; chartView2.Chart = chart2; chartView3.Chart = chart3; chartView4.Chart = chart4; chartView5.Chart = chart5; }
protected override void OnAppearing() { base.OnAppearing(); var entries = new[] { new Microcharts.Entry(212) { Label = "UWP", ValueLabel = "212", Color = SKColor.Parse("#2c3e50") }, new Microcharts.Entry(248) { Label = "Android", ValueLabel = "248", Color = SKColor.Parse("#77d065") }, new Microcharts.Entry(128) { Label = "iOS", ValueLabel = "128", Color = SKColor.Parse("#b455b6") }, new Microcharts.Entry(514) { Label = "Shared", ValueLabel = "514", Color = SKColor.Parse("#3498db") } }; var chart1 = new BarChart() { Entries = entries }; var chart2 = new LineChart() { Entries = entries }; var chart3 = new PointChart() { Entries = entries }; var chart4 = new RadialGaugeChart() { Entries = entries }; var chart5 = new DonutChart() { Entries = entries }; var chart6 = new RadarChart() { Entries = entries }; charView.Chart = chart1; charView1.Chart = chart2; charView2.Chart = chart3; charView3.Chart = chart4; charView4.Chart = chart5; charView5.Chart = chart6; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.HomePage); scroll = FindViewById <ScrollView>(Resource.Id.scrollview); Linear = FindViewById <LinearLayout>(Resource.Id.stack); screenWidth = Linear.Width; screenHeight = Linear.Height; dragAbleBt = FindViewById <ImageButton>(Resource.Id.button1); dragAbleBt.SetOnTouchListener(this); chartstack = FindViewById <LinearLayout>(Resource.Id.chartstack); chartView = FindViewById <ChartView>(Resource.Id.chart); recyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerview); bottomNavigation = FindViewById <BottomNavigationView>(Resource.Id.navigation); bottomNavigation.SetShiftMode(false, false); //Dummy data for chart var entries = new[] { new Entry(212) { Label = "12 Jun", ValueLabel = "212", Color = SKColor.Parse("#CBB268") }, new Entry(248) { Label = "13 Jun", ValueLabel = "248", Color = SKColor.Parse("#CBB268") }, new Entry(128) { Label = "14 Jun", ValueLabel = "128", Color = SKColor.Parse("#CBB268") }, new Entry(514) { Label = "15 Jun", ValueLabel = "514", Color = SKColor.Parse("#CBB268") }, new Entry(128) { Label = "16 Jun", ValueLabel = "128", Color = SKColor.Parse("#CBB268") }, new Entry(514) { Label = "17 Jun", ValueLabel = "514", Color = SKColor.Parse("#CBB268") }, new Entry(128) { Label = "18 Jun", ValueLabel = "128", Color = SKColor.Parse("#CBB268") } }; PointChart pointChart = new PointChart() { Entries = entries, LabelTextSize = 35, PointSize = 30 }; chartView.Chart = pointChart; //assigning data to recyclerview adapter var model = new ViewModel(); foreach (var s in model.Data) { EmployeeList.Add(s); } recyclerview_layoutmanger = new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false); recyclerView.SetLayoutManager(recyclerview_layoutmanger); recyclerview_adapter = new RecyclerAdapter(EmployeeList); recyclerView.SetAdapter(recyclerview_adapter); }
protected override void OnAppearing() { base.OnAppearing(); List <Entry> entries = new List <Entry> { new Entry(500) { Color = SKColor.Parse("#FF1943"), Label = "January", ValueLabel = "500", }, new Entry(400) { Color = SKColor.Parse("00BFFF"), Label = "March", ValueLabel = "400" }, new Entry(-100) { Color = SKColor.Parse("#00CED1"), Label = "October", ValueLabel = "-100" } }; var Chart1 = new RadialGaugeChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; var Chart2 = new LineChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; var Chart3 = new DonutChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; var Chart4 = new BarChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; var Chart5 = new PointChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; var Chart6 = new RadarChart() { Entries = entries, BackgroundColor = SKColors.Transparent, IsAnimated = true, AnimationDuration = TimeSpan.FromSeconds(5) }; ObservableCollection <ChartView> MyItemSource = new ObservableCollection <ChartView> { new ChartView() { Chart = Chart1 }, new ChartView() { Chart = Chart2 }, new ChartView() { Chart = Chart3 }, new ChartView() { Chart = Chart4 }, new ChartView() { Chart = Chart5 }, new ChartView() { Chart = Chart6 } }; chartcarousel.ItemsSource = MyItemSource; }
protected TanqueDetailViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IFishTechAPIService FishTechService) : base(navigationService, pageDialogService) { _FishTechService = FishTechService; _navigationService = navigationService; _pageDialogService = pageDialogService; phchart = new BarChart(); phchart.Entries = new[] { new Entry(6.5f) { Label = "08/06/2019", ValueLabel = "6.5", Color = SKColor.Parse("#FFA000") }, new Entry(6.8f) { Label = "10/06/2019", ValueLabel = "6.8", Color = SKColor.Parse("#D32F2F") }, new Entry(5.9f) { Label = "11/06/2019", ValueLabel = "5.9", Color = SKColor.Parse("#FFEB3B") }, new Entry(4.7f) { Label = "12/06/2019", ValueLabel = "4.7", Color = SKColor.Parse("#CDDC39") }, new Entry(5.8f) { Label = "13/06/2019", ValueLabel = "5.8", Color = SKColor.Parse("#FFEB3B") }, new Entry(7.4f) { Label = "14/06/2019", ValueLabel = "7.4", Color = SKColor.Parse("#D32F2F") }, new Entry(7.4f) { Label = "15/06/2019", ValueLabel = "7.4", Color = SKColor.Parse("#D32F2F") }, }; odchart = new LineChart() { LineMode = LineMode.Spline, LineSize = 8, PointMode = PointMode.Circle, PointSize = 18, }; odchart.Entries = new[] { new Entry(36.1f) { Label = "08/06/2019", ValueLabel = "36.1", Color = SKColor.Parse("#FFA000") }, new Entry(37.1f) { Label = "10/06/2019", ValueLabel = "37.1", Color = SKColor.Parse("#D32F2F") }, new Entry(33.1f) { Label = "11/06/2019", ValueLabel = "33.1", Color = SKColor.Parse("#FFEB3B") }, new Entry(31.1f) { Label = "12/06/2019", ValueLabel = "31.1", Color = SKColor.Parse("#CDDC39") }, new Entry(36.1f) { Label = "13/06/2019", ValueLabel = "36.1", Color = SKColor.Parse("#FFEB3B") }, new Entry(39.1f) { Label = "14/06/2019", ValueLabel = "39.1", Color = SKColor.Parse("#D32F2F") }, new Entry(36.1f) { Label = "15/06/2019", ValueLabel = "36.1", Color = SKColor.Parse("#FFA000") }, }; tempchart = new PointChart() { PointMode = PointMode.Square, MaxValue = 36.5f, MinValue = 33.5f }; tempchart.Entries = new[] { new Entry(33.1f) { Label = "09/06/2019", ValueLabel = "33.1", Color = SKColor.Parse("#CDDC39") }, new Entry(34.1f) { Label = "10/06/2019", ValueLabel = "34.1", Color = SKColor.Parse("#CDDC39") }, new Entry(34.8f) { Label = "11/06/2019", ValueLabel = "34.1", Color = SKColor.Parse("#FFEB3B") }, new Entry(34.8f) { Label = "12/06/2019", ValueLabel = "34.8", Color = SKColor.Parse("#FFEB3B") }, new Entry(35.6f) { Label = "13/06/2019", ValueLabel = "35.6", Color = SKColor.Parse("#FFEB3B") }, new Entry(36.2f) { Label = "14/06/2019", ValueLabel = "36.2", Color = SKColor.Parse("#D32F2F") }, new Entry(36.8f) { Label = "15/06/2019", ValueLabel = "36.8", Color = SKColor.Parse("#D32F2F") }, }; turbidezchart = new LineChart() { LineMode = LineMode.Straight, LineSize = 8, PointMode = PointMode.Square, PointSize = 18, }; turbidezchart.Entries = new[] { new Entry(33.1f) { Label = "09/06/2019", ValueLabel = "33.1", Color = SKColor.Parse("#CDDC39") }, new Entry(34.1f) { Label = "10/06/2019", ValueLabel = "34.1", Color = SKColor.Parse("#CDDC39") }, new Entry(34.8f) { Label = "11/06/2019", ValueLabel = "34.1", Color = SKColor.Parse("#FFEB3B") }, new Entry(34.8f) { Label = "12/06/2019", ValueLabel = "34.8", Color = SKColor.Parse("#FFEB3B") }, new Entry(35.6f) { Label = "13/06/2019", ValueLabel = "35.6", Color = SKColor.Parse("#FFEB3B") }, new Entry(36.2f) { Label = "14/06/2019", ValueLabel = "36.2", Color = SKColor.Parse("#D32F2F") }, new Entry(36.8f) { Label = "15/06/2019", ValueLabel = "36.8", Color = SKColor.Parse("#D32F2F") }, }; }