private SFChart GetMeterDevationChart() { var sfchart = new SFChart(); sfchart.Title.Text = "Distance Measurement"; sfchart.Legend.Visible = true; sfchart.Legend.DockPosition = SFChartLegendPosition.Top; sfchart.Legend.IconHeight = 14; sfchart.Legend.IconWidth = 14; sfchart.ColorModel.Palette = SFChartColorPalette.Natural; SFNumericalAxis numericalaxis = new SFNumericalAxis(); numericalaxis.AxisLineStyle.LineWidth = 0; numericalaxis.MajorTickStyle.LineWidth = 0; numericalaxis.Title.Text = new Foundation.NSString("Meters"); sfchart.SecondaryAxis = numericalaxis; SFNumericalAxis primaryAxis = new SFNumericalAxis(); primaryAxis.ShowMajorGridLines = false; primaryAxis.Title.Text = new Foundation.NSString("Seconds"); primaryAxis.ShowMinorGridLines = false; sfchart.PrimaryAxis = primaryAxis; splineSeries2 = new SFSplineSeries(); splineSeries2.ItemsSource = ChartViewModel.GetTrendlineDataSource2(); splineSeries2.XBindingPath = "XValue"; splineSeries2.YBindingPath = "YValue"; splineSeries2.Label = "Rupees"; splineSeries2.LegendIcon = SFChartLegendIcon.SeriesType; splineSeries2.DataMarker.ShowMarker = true; splineSeries2.DataMarker.ShowLabel = false; splineSeries2.DataMarker.MarkerHeight = 5; splineSeries2.DataMarker.MarkerWidth = 5; splineSeries2.DataMarker.MarkerBorderWidth = 2; splineSeries2.DataMarker.MarkerBorderColor = UIColor.FromName("#00bdae"); splineSeries2.Trendlines = new ChartTrendlineCollection(); powerTrendline = new SFChartTrendline() { Type = SFTrendlineType.Power, LineColor = UIColor.FromRGB(201, 23, 97), LegendIcon = SFChartLegendIcon.SeriesType, Label = "Power" }; splineSeries2.Trendlines.Add(powerTrendline); sfchart.Series.Add(splineSeries2); return(sfchart); }
private SFChart GetMeterDevationChart() { var sfchart = new SFChart(); sfchart.Title.Text = "Distance Measurement"; sfchart.Legend.Visible = true; sfchart.Legend.DockPosition = SFChartLegendPosition.Top; sfchart.Legend.IconHeight = 14; sfchart.Legend.IconWidth = 14; sfchart.ColorModel.Palette = SFChartColorPalette.Natural; SFNumericalAxis numericalaxis1 = new SFNumericalAxis(); numericalaxis1.AxisLineStyle.LineWidth = 0; numericalaxis1.MajorTickStyle.LineWidth = 0; numericalaxis1.Title.Text = new Foundation.NSString("Meters"); sfchart.SecondaryAxis = numericalaxis1; SFNumericalAxis primaryAxis = new SFNumericalAxis(); primaryAxis.ShowMajorGridLines = false; primaryAxis.Title.Text = new Foundation.NSString("Seconds"); primaryAxis.ShowMinorGridLines = false; sfchart.PrimaryAxis = primaryAxis; powerColumnSeries = new SFColumnSeries(); powerColumnSeries.ItemsSource = ChartViewModel.GetTrendlineDataSource2(); powerColumnSeries.XBindingPath = "XValue"; powerColumnSeries.YBindingPath = "YValue"; powerColumnSeries.Label = "Distance"; powerColumnSeries.LegendIcon = SFChartLegendIcon.SeriesType; powerColumnSeries.Trendlines = new ChartTrendlineCollection(); powerTrendline = new SFChartTrendline() { Type = SFTrendlineType.Power, LineColor = UIColor.FromRGB(64, 64, 65), LegendIcon = SFChartLegendIcon.SeriesType, Label = "Power" }; powerColumnSeries.Trendlines.Add(powerTrendline); sfchart.Series.Add(powerColumnSeries); return(sfchart); }