public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.Legend.Visibility = Visibility.Visible; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 8000)); datas.Add(new ChartDataPoint("2011", 8100)); datas.Add(new ChartDataPoint("2012", 8250)); datas.Add(new ChartDataPoint("2013", 8600)); datas.Add(new ChartDataPoint("2014", 8700)); var doughnutSeries = new DoughnutSeries { ExplodeIndex = 3, DataSource = datas, DataMarkerPosition = CircularSeriesDataMarkerPosition.OutsideExtended, }; doughnutSeries.DataMarker.ShowLabel = true; doughnutSeries.ConnectorType = ConnectorType.Bezier; chart.Series.Add(doughnutSeries); return(chart); }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis {PlotOffset = 50}; chart.SecondaryAxis = new NumericalAxis(); var bubble = new BubbleSeries(); bubble.ColorModel.ColorPalette = ChartColorPalette.Metro; bubble.DataMarker.ShowLabel = true; bubble.DataMarker.UseSeriesPalette = false; bubble.DataMarker.LabelStyle.TextColor = Color.White; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45, 30)); datas.Add(new ChartDataPoint("2011", 86, 20)); datas.Add(new ChartDataPoint("2012", 23, 15)); datas.Add(new ChartDataPoint("2013", 43, 25)); datas.Add(new ChartDataPoint("2014", 54, 20)); bubble.DataSource = datas; chart.Series.Add(bubble); return chart; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis { PlotOffset = 50 }; chart.SecondaryAxis = new NumericalAxis(); var bubble = new BubbleSeries(); bubble.ColorModel.ColorPalette = ChartColorPalette.Metro; bubble.DataMarker.ShowLabel = true; bubble.DataMarker.UseSeriesPalette = false; bubble.DataMarker.LabelStyle.TextColor = Color.White; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45, 30)); datas.Add(new ChartDataPoint("2011", 86, 20)); datas.Add(new ChartDataPoint("2012", 23, 15)); datas.Add(new ChartDataPoint("2013", 43, 25)); datas.Add(new ChartDataPoint("2014", 54, 20)); bubble.DataSource = datas; chart.Series.Add(bubble); return(chart); }
public static ObservableArrayList GetData1() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45)); datas.Add(new ChartDataPoint("2011", 89)); datas.Add(new ChartDataPoint("2012", 23)); datas.Add(new ChartDataPoint("2013", 43)); datas.Add(new ChartDataPoint("2014", 54)); return datas; }
public static ObservableArrayList GetLineData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45.68)); datas.Add(new ChartDataPoint("2011", 89.25)); datas.Add(new ChartDataPoint("2012", 23.73)); datas.Add(new ChartDataPoint("2013", 43.5)); datas.Add(new ChartDataPoint("2014", 54.92)); return datas; }
private void LoadData() { for (var i = 0; i < 2; i++) { data.Add(new ChartDataPoint(calendar.Time, random.Next(0, 100))); calendar.Add(CalendarField.Millisecond, 500); count++; } count = data.Size(); }
public static ObservableArrayList GetCategoryData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Bentley", 54)); datas.Add(new ChartDataPoint("Audi", 24)); datas.Add(new ChartDataPoint("BMW", 53)); datas.Add(new ChartDataPoint("Jaguar", 63)); datas.Add(new ChartDataPoint("Skoda", 35)); return datas; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis { ShowMajorGridLines = false, PlotOffset = 20 }; chart.SecondaryAxis = new NumericalAxis() { ShowMajorGridLines = false, PlotOffset = 20 }; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2005", 54)); datas.Add(new ChartDataPoint("2006", 34)); datas.Add(new ChartDataPoint("2007", 53)); datas.Add(new ChartDataPoint("2008", 63)); datas.Add(new ChartDataPoint("2009", 35)); datas.Add(new ChartDataPoint("2010", 27)); datas.Add(new ChartDataPoint("2011", 13)); datas.Add(new ChartDataPoint("2012", 40)); datas.Add(new ChartDataPoint("2013", 25)); var scatterSeries = new ScatterSeries { DataSource = datas, ScatterHeight = 20, ScatterWidth = 20 }; scatterSeries.DataMarker.ShowLabel = true; chart.Series.Add(scatterSeries); return chart; }
public static ObservableArrayList GetLineData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45.68)); datas.Add(new ChartDataPoint("2011", 89.25)); datas.Add(new ChartDataPoint("2012", 23.73)); datas.Add(new ChartDataPoint("2013", 43.5)); datas.Add(new ChartDataPoint("2014", 54.92)); return(datas); }
public static ObservableArrayList GetSeriesData3() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 24)); datas.Add(new ChartDataPoint(2, 14)); datas.Add(new ChartDataPoint(3, 33)); datas.Add(new ChartDataPoint(4, 43)); datas.Add(new ChartDataPoint(5, 15)); return(datas); }
public static ObservableArrayList GetCategoryData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Bentley", 54)); datas.Add(new ChartDataPoint("Audi", 24)); datas.Add(new ChartDataPoint("BMW", 53)); datas.Add(new ChartDataPoint("Jaguar", 63)); datas.Add(new ChartDataPoint("Skoda", 35)); return(datas); }
public static ObservableArrayList GetSeriesData2() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 34)); datas.Add(new ChartDataPoint(2, 20)); datas.Add(new ChartDataPoint(3, 43)); datas.Add(new ChartDataPoint(4, 53)); datas.Add(new ChartDataPoint(5, 25)); return(datas); }
public static ObservableArrayList GetFinancialData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 873.8, 878.85, 855.5, 860.5)); datas.Add(new ChartDataPoint("2011", 861, 868.4, 835.2, 843.45)); datas.Add(new ChartDataPoint("2012", 846.15, 853, 838.5, 847.5)); datas.Add(new ChartDataPoint("2013", 846, 860.75, 841, 855)); datas.Add(new ChartDataPoint("2014", 841, 845, 827.85, 838.65)); return(datas); }
public static ObservableArrayList GetNumericalData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 54)); datas.Add(new ChartDataPoint(2, 24)); datas.Add(new ChartDataPoint(3, 53)); datas.Add(new ChartDataPoint(4, 63)); datas.Add(new ChartDataPoint(5, 35)); return(datas); }
public static ObservableArrayList GetData2() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 54)); datas.Add(new ChartDataPoint("2011", 24)); datas.Add(new ChartDataPoint("2012", 53)); datas.Add(new ChartDataPoint("2013", 63)); datas.Add(new ChartDataPoint("2014", 35)); return(datas); }
public static ObservableArrayList GetTriangularData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Bentley", 800)); datas.Add(new ChartDataPoint("Audi", 810)); datas.Add(new ChartDataPoint("BMW", 825)); datas.Add(new ChartDataPoint("Jaguar", 860)); datas.Add(new ChartDataPoint("Skoda", 875)); return(datas); }
private static ObservableArrayList GetBalanceGroupByMonthPerAccount(Account account) { var transactions = SilverCoinsManager.GetTransactions() .Where(x => x.Type != "Transfer" && x.CreatedDate >= DateTime.Today.AddYears(-1) && x.Account == account.Id) .OrderBy(x => x.CreatedDate) .ToList(); List <ResultLine> resultList = transactions.GroupBy(x => x.CreatedDate.Month) .Select(r => new ResultLine { Name = r.First().CreatedDate.ToString("MMM"), Value = r.Sum(x => (x.Type == "Income" ? x.Amount : -x.Amount)) }) .ToList(); ObservableArrayList list = new ObservableArrayList(); decimal balance = 0; foreach (var item in resultList) { balance += item.Value; list.Add(new ChartDataPoint(item.Name, Convert.ToDouble(balance))); } return(list); }
internal static List <ObservableArrayList> BarChartData(Account account) { var transactions = SilverCoinsManager.GetTransactions() .Where(x => x.Type != "Transfer" && x.CreatedDate >= DateTime.Today.AddYears(-1)) .OrderBy(x => x.CreatedDate) .ToList(); if (account.Id != 0) { transactions = transactions.Where(x => x.Account == account.Id).ToList(); } List <ResultLine> resultListIncome = GetDataForTransactionsGroupByMonth(transactions.Where(x => x.Type == "Income").ToList()); List <ResultLine> resultListExpense = GetDataForTransactionsGroupByMonth(transactions.Where(x => x.Type == "Expense").ToList()); ObservableArrayList listIncome = new ObservableArrayList(); ObservableArrayList listExpense = new ObservableArrayList(); foreach (var item in resultListIncome) { listIncome.Add(new ChartDataPoint(item.Name, Convert.ToDouble(item.Value))); } foreach (var item in resultListExpense) { listExpense.Add(new ChartDataPoint(item.Name, Convert.ToDouble(item.Value))); } List <ObservableArrayList> dataModel = new List <ObservableArrayList>(); dataModel.Add(listIncome); dataModel.Add(listExpense); return(dataModel); }
internal static ObservableArrayList PieChartData(Account account) { List <Transaction> transactions = new List <Transaction>(); if (account.Id != 0) { transactions = SilverCoinsManager.GetTransactions().Where(x => x.Type != "Transfer" && x.Account == account.Id).ToList(); } else { transactions = SilverCoinsManager.GetTransactions().Where(x => x.Type != "Transfer").ToList(); } List <ResultLine> resultList = transactions.GroupBy(x => x.Category) .Select(r => new ResultLine { Name = SilverCoinsManager.GetCategory(r.First().Category).Name, Value = r.Sum(s => s.Amount) }) .ToList(); ObservableArrayList list = new ObservableArrayList(); foreach (var item in resultList) { list.Add(new ChartDataPoint(item.Name, Convert.ToDouble(item.Value))); } return(list); }
private void LoadData() { for (var i = 0; i < 180; i++) { data.Add(new ChartDataPoint(i, Math.Sin(wave1 * (Math.PI / 180.0)))); wave1++; } for (var i = 0; i < 180; i++) { data2.Add(new ChartDataPoint(i, Math.Sin(wave2 * (Math.PI / 180.0)))); wave2++; } wave1 = data.Size(); }
public GraphModel(double[] Xi, double[] Yi) { Data = new ObservableArrayList(); for (int i = 0; i < Xi.Length; i++) { Data.Add(new ChartDataPoint(Xi[i], Yi[i])); } }
public static ObservableArrayList GetAreaData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45)); datas.Add(new ChartDataPoint("2011", 56)); datas.Add(new ChartDataPoint("2012", 23)); datas.Add(new ChartDataPoint("2013", 43)); datas.Add(new ChartDataPoint("2014", Double.NaN)); datas.Add(new ChartDataPoint("2015", 54)); datas.Add(new ChartDataPoint("2016", 43)); datas.Add(new ChartDataPoint("2017", 23)); datas.Add(new ChartDataPoint("2018", 34)); return datas; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.Title.Text = "Products Growth - 2015"; chart.Legend.Visibility = Visibility.Visible; if (context.Resources.DisplayMetrics.HeightPixels > context.Resources.DisplayMetrics.WidthPixels) { int padding = (context.Resources.DisplayMetrics.HeightPixels - context.Resources.DisplayMetrics.WidthPixels) / 2; chart.SetPadding(0, padding / 2, 0, padding); chart.Legend.DockPosition = ChartDock.Bottom; } else { int padding = (context.Resources.DisplayMetrics.WidthPixels - context.Resources.DisplayMetrics.HeightPixels) / 2; chart.SetPadding(padding, 0, padding, 0); chart.Legend.ItemMarginRight = padding / 6; chart.Legend.DockPosition = ChartDock.Right; } var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Product A", 14)); datas.Add(new ChartDataPoint("Product B", 54)); datas.Add(new ChartDataPoint("Product C", 23)); datas.Add(new ChartDataPoint("Product D", 53)); var doughnutSeries = new DoughnutSeries { DataSource = datas, StartAngle = 180, EndAngle = 360 }; doughnutSeries.DataMarker.ShowLabel = true; doughnutSeries.DataMarker.LabelContent = LabelContent.Percentage; doughnutSeries.DataMarkerPosition = CircularSeriesDataMarkerPosition.Outside; chart.Series.Add(doughnutSeries); return(chart); }
public static ObservableArrayList GetAreaData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 45)); datas.Add(new ChartDataPoint("2011", 56)); datas.Add(new ChartDataPoint("2012", 23)); datas.Add(new ChartDataPoint("2013", 43)); datas.Add(new ChartDataPoint("2014", Double.NaN)); datas.Add(new ChartDataPoint("2015", 54)); datas.Add(new ChartDataPoint("2016", 43)); datas.Add(new ChartDataPoint("2017", 23)); datas.Add(new ChartDataPoint("2018", 34)); return(datas); }
public static ObservableArrayList GetNumericalData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 54)); datas.Add(new ChartDataPoint(2, 24)); datas.Add(new ChartDataPoint(3, 53)); datas.Add(new ChartDataPoint(4, 63)); datas.Add(new ChartDataPoint(5, 35)); return datas; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context); chart.SetBackgroundColor(Color.White); chart.Title.Text = "Products Growth - 2015"; chart.Legend.Visibility = Visibility.Visible; if (context.Resources.DisplayMetrics.HeightPixels > context.Resources.DisplayMetrics.WidthPixels) { int padding = (context.Resources.DisplayMetrics.HeightPixels - context.Resources.DisplayMetrics.WidthPixels) / 2; chart.SetPadding(0, padding / 2, 0, padding); chart.Legend.DockPosition = ChartDock.Bottom; } else { int padding = (context.Resources.DisplayMetrics.WidthPixels - context.Resources.DisplayMetrics.HeightPixels) / 2; chart.SetPadding(padding, 0, padding, 0); chart.Legend.ItemMarginRight = padding / 6; chart.Legend.DockPosition = ChartDock.Right; } var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Product A", 14)); datas.Add(new ChartDataPoint("Product B", 54)); datas.Add(new ChartDataPoint("Product C", 23)); datas.Add(new ChartDataPoint("Product D", 53)); var pieSeries = new PieSeries { DataSource = datas, StartAngle = 180, EndAngle = 360, }; pieSeries.DataMarker.ShowLabel = true; pieSeries.DataMarker.LabelContent = LabelContent.Percentage; pieSeries.DataMarkerPosition = CircularSeriesDataMarkerPosition.Outside; chart.Series.Add(pieSeries); return chart; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis { LabelPlacement = LabelPlacement.BetweenTicks }; chart.SecondaryAxis = new NumericalAxis() { ShowMajorGridLines = false }; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 35, 17)); datas.Add(new ChartDataPoint("Feb", 42, -11)); datas.Add(new ChartDataPoint("Mar", 25, 5)); datas.Add(new ChartDataPoint("Apr", 32, 10)); datas.Add(new ChartDataPoint("May", 20, 3)); datas.Add(new ChartDataPoint("Jun", 41, 30)); var series = new RangeColumnSeries { DataSource = datas, }; series.DataMarker.ShowLabel = true; chart.Series.Add(series); return(chart); }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis { LabelPlacement = LabelPlacement.BetweenTicks }; chart.SecondaryAxis = new NumericalAxis() { ShowMajorGridLines = false }; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 35, 17)); datas.Add(new ChartDataPoint("Feb", 42, -11)); datas.Add(new ChartDataPoint("Mar", 25, 5)); datas.Add(new ChartDataPoint("Apr", 32, 10)); datas.Add(new ChartDataPoint("May", 20, 3)); datas.Add(new ChartDataPoint("Jun", 41, 30)); var series = new RangeColumnSeries { DataSource = datas, }; series.DataMarker.ShowLabel = true; chart.Series.Add(series); return chart; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.PrimaryAxis = new CategoryAxis { ShowMajorGridLines = false, PlotOffset = 20 }; chart.SecondaryAxis = new NumericalAxis() { ShowMajorGridLines = false, PlotOffset = 20 }; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2005", 54)); datas.Add(new ChartDataPoint("2006", 34)); datas.Add(new ChartDataPoint("2007", 53)); datas.Add(new ChartDataPoint("2008", 63)); datas.Add(new ChartDataPoint("2009", 35)); datas.Add(new ChartDataPoint("2010", 27)); datas.Add(new ChartDataPoint("2011", 13)); datas.Add(new ChartDataPoint("2012", 40)); datas.Add(new ChartDataPoint("2013", 25)); var scatterSeries = new ScatterSeries { DataSource = datas, ScatterHeight = 20, ScatterWidth = 20 }; scatterSeries.DataMarker.ShowLabel = true; chart.Series.Add(scatterSeries); return(chart); }
public static ObservableArrayList GetSelectionData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 42)); datas.Add(new ChartDataPoint("Feb", 44)); datas.Add(new ChartDataPoint("Mar", 53)); datas.Add(new ChartDataPoint("Apr", 64)); datas.Add(new ChartDataPoint("May", 75)); datas.Add(new ChartDataPoint("Jun", 83)); return(datas); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); /* linklabel1.LinkText = "Google"; * linklabel1.LinkURL = "http://www.google.com"; * linklabel1.Pixbuf = (Gdk.Pixbuf) PictureResourceStore.LoadResource ("calendar.png"); * colorlabel1.Color = new Cairo.Color (1, 0, 0); * colorlabel1.SmallFonts = true;*/ ObservableArrayList lst = new ObservableArrayList(); for (double i = 0.0; i <= 1.0; i = i + 0.1) { lst.Add(new ColorClass(new Cairo.Color(i, i, i))); } foreach (ColorClass c in lst) { System.Console.WriteLine(c); } datatreeview1.ItemsDataSource = lst; }
public static ObservableArrayList GetDateTimValue() { Calendar calendar = new GregorianCalendar(2014, 1, 1); var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(calendar.Time, 10d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 23d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 22d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 32d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 31d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 12d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 26d)); return(datas); }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.Legend.ToggleSeriesVisibility = true; chart.Legend.Visibility = Visibility.Visible; var primary = new CategoryAxis(); primary.Title.Text = "Years"; primary.Title.TextColor = Color.Black; primary.LabelPlacement = LabelPlacement.BetweenTicks; chart.PrimaryAxis = primary; var secondaryAxis = new NumericalAxis() { Minimum = 6200, Maximum = 8800, Interval = 200, ShowMajorGridLines = false }; secondaryAxis.Title.Text = "Revenue"; secondaryAxis.LabelStyle.LabelFormat = "$####"; chart.SecondaryAxis = secondaryAxis; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 8000)); datas.Add(new ChartDataPoint("2011", 8100)); datas.Add(new ChartDataPoint("2012", 8250)); datas.Add(new ChartDataPoint("2013", 8600)); datas.Add(new ChartDataPoint("2014", 8700)); var datas1 = new ObservableArrayList(); datas1.Add(new ChartDataPoint("2010", 6)); datas1.Add(new ChartDataPoint("2011", 15)); datas1.Add(new ChartDataPoint("2012", 35)); datas1.Add(new ChartDataPoint("2013", 65)); datas1.Add(new ChartDataPoint("2014", 75)); chart.Series.Add(new ColumnSeries() { Label = "Revenue", DataSource = datas }); var lineSeries = new FastLineSeries() { Label = "Customers", DataSource = datas1, StrokeWidth = 7, YAxis = new NumericalAxis() { OpposedPosition = true, Minimum = 0, Maximum = 80, Interval = 5, ShowMajorGridLines = false, } }; chart.Series.Add(lineSeries); lineSeries.YAxis.Title.Text = "Number of Customers"; return chart; }
public DataModel() { HighTemperature = new ObservableArrayList(); HighTemperature.Add(new ChartDataPoint("Jan", 42)); HighTemperature.Add(new ChartDataPoint("Feb", 44)); HighTemperature.Add(new ChartDataPoint("Mar", 53)); HighTemperature.Add(new ChartDataPoint("Apr", 64)); HighTemperature.Add(new ChartDataPoint("May", 75)); HighTemperature.Add(new ChartDataPoint("Jun", 83)); HighTemperature.Add(new ChartDataPoint("Jul", 87)); HighTemperature.Add(new ChartDataPoint("Aug", 84)); HighTemperature.Add(new ChartDataPoint("Sep", 78)); HighTemperature.Add(new ChartDataPoint("Oct", 67)); HighTemperature.Add(new ChartDataPoint("Nov", 55)); HighTemperature.Add(new ChartDataPoint("Dec", 45)); }
public static ObservableArrayList GetSelectionData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 42)); datas.Add(new ChartDataPoint("Feb", 44)); datas.Add(new ChartDataPoint("Mar", 53)); datas.Add(new ChartDataPoint("Apr", 64)); datas.Add(new ChartDataPoint("May", 75)); datas.Add(new ChartDataPoint("Jun", 83)); return datas; }
//--------------------------------------------------------------------------------------------------------------------------------------------------- public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); //Element from the layout. SfChart Graph = new SfChart(Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity); //Axes settings. CategoryAxis AxeX = new CategoryAxis(); NumericalAxis AxeY = new NumericalAxis(); Graph.PrimaryAxis = AxeX; Graph.SecondaryAxis = AxeY; AxeX.LabelRotationAngle = 315; AxeX.LabelStyle.TextColor = Android.Graphics.Color.Black; AxeY.LabelStyle.TextColor = Android.Graphics.Color.Black; AxeX.EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift; //Graph settings. Graph.SetBackgroundColor(Android.Graphics.Color.DarkGreen); ChartZoomPanBehavior Zoom = new ChartZoomPanBehavior(); Graph.Behaviors.Add(Zoom); ObservableArrayList ListForData = new ObservableArrayList(); //If the user is choosed. if (Classes.User.CurrentUser != -1) { //Getting parameters of currrent user from DB. int k = 1; foreach (ParametresOfUser TempParametres in DatabaseUser.GetUser(User.CurrentUser).Parameters) { ListForData.Add(new ChartDataPoint(TempParametres.EntryDate.ToShortDateString(), TempParametres.Weight)); } //Setting data to the list SplineSeries Seria = new SplineSeries(); Seria.DataSource = ListForData; //Settings oof lables. Seria.DataMarker.ShowMarker = true; Seria.DataMarker.ShowLabel = true; Seria.DataMarker.MarkerColor = Android.Graphics.Color.Yellow; Seria.DataMarker.ConnectorLineStyle.ConnectorHeight = 50; Seria.DataMarker.ConnectorLineStyle.ConnectorRotationAngle = 175; Seria.DataMarker.ConnectorLineStyle.PathEffect = new DashPathEffect(new float[] { 3, 3 }, 3); //Adding graph to form. Graph.Series.Add(Seria); } //If the user isn't choosed. else { HelpclassDataValidation.MakingErrorToast(Resource.String.ErrorMessage_Unchoosed); } return(Graph); }
public static ObservableArrayList GetSeriesData2() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 34)); datas.Add(new ChartDataPoint(2, 20)); datas.Add(new ChartDataPoint(3, 43)); datas.Add(new ChartDataPoint(4, 53)); datas.Add(new ChartDataPoint(5, 25)); return datas; }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.Legend.ToggleSeriesVisibility = true; chart.Legend.Visibility = Visibility.Visible; var primary = new CategoryAxis(); primary.Title.Text = "Years"; primary.Title.TextColor = Color.Black; primary.LabelPlacement = LabelPlacement.BetweenTicks; chart.PrimaryAxis = primary; var secondaryAxis = new NumericalAxis() { Minimum = 6200, Maximum = 8800, Interval = 200, ShowMajorGridLines = false }; secondaryAxis.Title.Text = "Revenue"; secondaryAxis.LabelStyle.LabelFormat = "$####"; chart.SecondaryAxis = secondaryAxis; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 8000)); datas.Add(new ChartDataPoint("2011", 8100)); datas.Add(new ChartDataPoint("2012", 8250)); datas.Add(new ChartDataPoint("2013", 8600)); datas.Add(new ChartDataPoint("2014", 8700)); var datas1 = new ObservableArrayList(); datas1.Add(new ChartDataPoint("2010", 6)); datas1.Add(new ChartDataPoint("2011", 15)); datas1.Add(new ChartDataPoint("2012", 35)); datas1.Add(new ChartDataPoint("2013", 65)); datas1.Add(new ChartDataPoint("2014", 75)); chart.Series.Add(new ColumnSeries() { Label = "Revenue", DataSource = datas }); var lineSeries = new FastLineSeries() { Label = "Customers", DataSource = datas1, StrokeWidth = 7, YAxis = new NumericalAxis() { OpposedPosition = true, Minimum = 0, Maximum = 80, Interval = 5, ShowMajorGridLines = false, } }; chart.Series.Add(lineSeries); lineSeries.YAxis.Title.Text = "Number of Customers"; return(chart); }
public static ObservableArrayList GetSeriesData3() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(1, 24)); datas.Add(new ChartDataPoint(2, 14)); datas.Add(new ChartDataPoint(3, 33)); datas.Add(new ChartDataPoint(4, 43)); datas.Add(new ChartDataPoint(5, 15)); return datas; }
public static ObservableArrayList GetTriangularData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Bentley", 800)); datas.Add(new ChartDataPoint("Audi", 810)); datas.Add(new ChartDataPoint("BMW", 825)); datas.Add(new ChartDataPoint("Jaguar", 860)); datas.Add(new ChartDataPoint("Skoda", 875)); return datas; }
public static ObservableArrayList GetDateTimValue() { Calendar calendar = new GregorianCalendar(2014, 1, 1); var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint(calendar.Time, 10d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 23d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 22d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 32d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 31d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 12d)); AddDate(calendar); datas.Add(new ChartDataPoint(calendar.Time, 26d)); return datas; }
public static ObservableArrayList GetStripLineData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 33)); datas.Add(new ChartDataPoint("Feb", 37)); datas.Add(new ChartDataPoint("Mar", 39)); datas.Add(new ChartDataPoint("Apr", 43)); datas.Add(new ChartDataPoint("May", 45)); datas.Add(new ChartDataPoint("Jun", 43)); datas.Add(new ChartDataPoint("Jul", 41)); datas.Add(new ChartDataPoint("Aug", 40)); datas.Add(new ChartDataPoint("Sep", 39)); datas.Add(new ChartDataPoint("Oct", 39)); datas.Add(new ChartDataPoint("Nov", 34)); datas.Add(new ChartDataPoint("Dec", 33)); return datas; }
public static ObservableArrayList GetFinancialData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 873.8, 878.85, 855.5, 860.5)); datas.Add(new ChartDataPoint("2011", 861, 868.4, 835.2, 843.45)); datas.Add(new ChartDataPoint("2012", 846.15, 853, 838.5, 847.5)); datas.Add(new ChartDataPoint("2013", 846, 860.75, 841, 855)); datas.Add(new ChartDataPoint("2014", 841, 845, 827.85, 838.65)); return datas; }
public static ObservableArrayList GetStripLineData() { var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("Jan", 33)); datas.Add(new ChartDataPoint("Feb", 37)); datas.Add(new ChartDataPoint("Mar", 39)); datas.Add(new ChartDataPoint("Apr", 43)); datas.Add(new ChartDataPoint("May", 45)); datas.Add(new ChartDataPoint("Jun", 43)); datas.Add(new ChartDataPoint("Jul", 41)); datas.Add(new ChartDataPoint("Aug", 40)); datas.Add(new ChartDataPoint("Sep", 39)); datas.Add(new ChartDataPoint("Oct", 39)); datas.Add(new ChartDataPoint("Nov", 34)); datas.Add(new ChartDataPoint("Dec", 33)); return(datas); }
public override View GetSampleContent(Context context) { var chart = new SfChart(context);; chart.SetBackgroundColor(Color.White); chart.Legend.Visibility = Visibility.Visible; var datas = new ObservableArrayList(); datas.Add(new ChartDataPoint("2010", 8000)); datas.Add(new ChartDataPoint("2011", 8100)); datas.Add(new ChartDataPoint("2012", 8250)); datas.Add(new ChartDataPoint("2013", 8600)); datas.Add(new ChartDataPoint("2014", 8700)); var doughnutSeries = new DoughnutSeries { ExplodeIndex = 3, DataSource = datas, DataMarkerPosition = CircularSeriesDataMarkerPosition.OutsideExtended, }; doughnutSeries.DataMarker.ShowLabel = true; doughnutSeries.ConnectorType = ConnectorType.Bezier; chart.Series.Add(doughnutSeries); return chart; }