Hi All,
I need to control scrolling for my app written in Xamarin/iOS.
Reading other forum entries, I guess, I need to access the TChartScrollBar in order to set min/max.
Based on some examples in the forum, you can access hScrollBar via Xaml. However I don't know how to do that with Xamarin/iOS.
Can someone tell me please how to control scrolling min/max for Xamarin/iOS apps?
Thanks
--maX
Scrolling for Xamarin/iOS
Re: Scrolling for Xamarin/iOS
HI Steema Support,
Can you tell me how to get hscrollBar in Xamarin/iOS?
In many samples, see below, you mention 'hscrollBar' but could not find anywhere in your documentation where you get this reference initialised.
void tChart1_AfterDraw(object sender, Steema.TeeChart.WPF.Drawing.Graphics3D g)
{
tChart1.Axes.Bottom.SetMinMax(tChart1[0].XValues[0], tChart1[0].XValues[50]);
hscrollBar.Minimum = 0;
hscrollBar.Maximum = 100;
value = tChart1.Axes.Bottom.Minimum + ((tChart1.Axes.Bottom.Maximum - tChart1.Axes.Bottom.Minimum) / 2);
AxisMin = hscrollBar.Minimum;
AxisMax = hscrollBar.Maximum;
}
Thanks
--maX
Can you tell me how to get hscrollBar in Xamarin/iOS?
In many samples, see below, you mention 'hscrollBar' but could not find anywhere in your documentation where you get this reference initialised.
void tChart1_AfterDraw(object sender, Steema.TeeChart.WPF.Drawing.Graphics3D g)
{
tChart1.Axes.Bottom.SetMinMax(tChart1[0].XValues[0], tChart1[0].XValues[50]);
hscrollBar.Minimum = 0;
hscrollBar.Maximum = 100;
value = tChart1.Axes.Bottom.Minimum + ((tChart1.Axes.Bottom.Maximum - tChart1.Axes.Bottom.Minimum) / 2);
AxisMin = hscrollBar.Minimum;
AxisMax = hscrollBar.Maximum;
}
Thanks
--maX
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Scrolling for Xamarin/iOS
Hello maX,
Many apologies for the delay in response to your questions. Yesterday was a national holiday here, and the developer responsible for Xamarin.iOS is on annual leave this week. We will try and get a response to you as quickly as possible.
Many apologies for the delay in response to your questions. Yesterday was a national holiday here, and the developer responsible for Xamarin.iOS is on annual leave this week. We will try and get a response to you as quickly as possible.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Scrolling for Xamarin/iOS
Hello maX,
you've two ways to add horizontal scroll to the Chart. You can always set a value to MaxPointsPerPage property, this will automatically separate the number of points by different pages allowing to scroll by panning, or by using specific buttons to call for previous or next page. The code to use it :
The other way would be to use an UISlider control to manage the min and max bottom axis values. You'd have to use code similar to the following one :
you've two ways to add horizontal scroll to the Chart. You can always set a value to MaxPointsPerPage property, this will automatically separate the number of points by different pages allowing to scroll by panning, or by using specific buttons to call for previous or next page. The code to use it :
Code: Select all
Chart.Panning.Allow = ScrollModes.Horizontal;
// Scroll by points per page....
Chart.Page.MaxPointsPerPage = 10;
Code: Select all
// Number of points is 100
// Scroll by using UISlider and SetMinMax
Chart.Panel.MarginBottom += 10;
Chart.Axes.Bottom.SetMinMax(0, 10);
UISlider slider1 = new UISlider(new CoreGraphics.CGRect(0,this.View.Frame.Height - 25,this.View.Frame.Width, 20));
slider1.MinValue = 5;
slider1.MaxValue = 95;
slider1.Value = 5.0f; // the current value
slider1.ValueChanged += (sender, e) => Chart.Axes.Bottom.SetMinMax(((UISlider)sender).Value - 5, ((UISlider)sender).Value + 5);
// Finally adding the Chart View as SubView to the parent View
View.AddSubview(Chart);
View.AddSubview(slider1);
Pep Jorge
http://support.steema.com
http://support.steema.com