public override SFSeries GetSeries(SFChart chart, nint index) { SFBubbleSeries series = new SFBubbleSeries(); series.DataMarker.ShowLabel = true; return(series); }
public Bubble() { SFChart chart = new SFChart(); chart.Title.Text = new NSString("World Countries Details"); SFNumericalAxis primaryAxis = new SFNumericalAxis(); chart.PrimaryAxis = primaryAxis; primaryAxis.Minimum = new NSNumber(60); primaryAxis.Maximum = new NSNumber(100); primaryAxis.Interval = new NSNumber(5); primaryAxis.ShowMinorGridLines = false; primaryAxis.ShowMajorGridLines = false; chart.PrimaryAxis.Title.Text = new NSString("Literacy Rate"); chart.SecondaryAxis = new SFNumericalAxis(); chart.SecondaryAxis.Title.Text = new NSString("GDP Growth Rate"); chart.SecondaryAxis.Minimum = new NSNumber(0); chart.SecondaryAxis.Maximum = new NSNumber(10); chart.SecondaryAxis.Interval = new NSNumber(2.5); chart.SecondaryAxis.ShowMinorGridLines = false; chart.SecondaryAxis.ShowMajorGridLines = false; chart.Delegate = new TooltipFormatter(); ChartViewModel dataModel = new ChartViewModel(); SFBubbleSeries series = new SFBubbleSeries(); series.EnableTooltip = true; series.Alpha = 0.6f; series.ItemsSource = dataModel.BubbleData; series.XBindingPath = "XValue"; series.YBindingPath = "YValue"; series.Size = "Size"; series.MaximumRadius = 40; series.MinimumRadius = 5; series.ColorModel.Palette = SFChartColorPalette.Natural; series.EnableAnimation = true; chart.Series.Add(series); var tooltip = new SFChartTooltipBehavior(); tooltip.BackgroundColor = UIColor.FromRGBA(64.0f / 255.0f, 64.0f / 255.0f, 65.0f / 255.0f, 1.0f); chart.AddChartBehavior(tooltip); this.AddSubview(chart); }
public Bubble() { SFChart chart = new SFChart(); chart.Title.Text = new NSString("World Countries Details"); SFNumericalAxis primaryAxis = new SFNumericalAxis(); chart.PrimaryAxis = primaryAxis; primaryAxis.Minimum = new NSNumber(50); primaryAxis.Maximum = new NSNumber(110); primaryAxis.Interval = new NSNumber(10); primaryAxis.ShowMinorGridLines = false; primaryAxis.ShowMajorGridLines = false; chart.PrimaryAxis.Title.Text = new NSString("Literacy Rate"); chart.SecondaryAxis = new SFNumericalAxis(); chart.SecondaryAxis.Title.Text = new NSString("GDP Growth Rate"); chart.SecondaryAxis.Minimum = new NSNumber(-2); chart.SecondaryAxis.Maximum = new NSNumber(16); chart.SecondaryAxis.ShowMinorGridLines = false; chart.SecondaryAxis.ShowMajorGridLines = false; ChartViewModel dataModel = new ChartViewModel(); SFBubbleSeries series = new SFBubbleSeries(); series.EnableTooltip = true; series.Alpha = 0.6f; series.ItemsSource = dataModel.BubbleData; series.XBindingPath = "XValue"; series.YBindingPath = "YValue"; series.Size = "Size"; series.MaximumRadius = 20; series.MinimumRadius = 5; series.ColorModel.Palette = SFChartColorPalette.Natural; series.EnableAnimation = true; chart.Series.Add(series); chart.AddChartBehavior(new SFChartZoomPanBehavior()); this.AddSubview(chart); }
public override SFSeries GetSeries (SFChart chart, nint index) { SFBubbleSeries series = new SFBubbleSeries (); series.DataMarker.ShowLabel = true; return series; }