I'm having a problem with the generated chart because it is always misplaced (see attachement). My project is locked at landscape view and still it is not properly displayed. I use a "UIImageView" object to reference as a frame and also the chart is added as a subview (or View in some test).
In the attachement, the chart should be a little underneath and beside the buttons and throughout the remaining spaces. Also, I'm using an iPhone 3gs as a test device.
TeeCHart Display problem for Xamarin.iOS
TeeCHart Display problem for Xamarin.iOS
- Attachments
-
- WP_20140410_05_16_05_Pro.jpg (295.02 KiB) Viewed 10331 times
Re: TeeCHart Display problem for Xamarin.iOS
Hello,
please take a look at the TeeChartBuilder example (which is included within the installer) code. There you can find a way to fix where the chart is placed, once the device is rotated, basically :
please take a look at the TeeChartBuilder example (which is included within the installer) code. There you can find a way to fix where the chart is placed, once the device is rotated, basically :
Code: Select all
public override void ViewDidAppear (bool animated)
{
UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications();
CheckPositions ();
}
public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations ()
{
return base.GetSupportedInterfaceOrientations ();
}
private void DeviceRotated(NSNotification notification)
{
CheckPositions();
}
public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
{
CheckPositions ();
}
private void CheckPositions()
{
// Refresh Chart rotating the device
chart.RemoveFromSuperview ();
RectangleF f = new RectangleF(View.Frame.X,50,View.Frame.Width,View.Frame.Height-BottomBar.Frame.Height-50);
chart.Frame = f;
View.AddSubview (chart);
chart.DoInvalidate ();
BottomBar.Frame = new RectangleF (0,View.Frame.Height-50,
this.chart.Frame.Width,50);
}
Pep Jorge
http://support.steema.com
http://support.steema.com
Re: TeeCHart Display problem for Xamarin.iOS
Actually the supported view of my app is just "Landscape" view as I'm having a hard time dealing with the orientation. Nevertheless even if the app only supports one orientation, the chart generated by TeeChart is still misplaced.
Re: TeeCHart Display problem for Xamarin.iOS
Hello,
so, if I understand, you need to open a new View, in landscape mode and be able to show the Chart as a client or at specific position, isn't it ?
I'm asking to you in order to prepare a code that does that.
so, if I understand, you need to open a new View, in landscape mode and be able to show the Chart as a client or at specific position, isn't it ?
I'm asking to you in order to prepare a code that does that.
Pep Jorge
http://support.steema.com
http://support.steema.com
Re: TeeCHart Display problem for Xamarin.iOS
No Sir, I have no problem in the orientation since I set it to only support lanscape mode. The chart is misplacedHello,
so, if I understand, you need to open a new View, in landscape mode and be able to show the Chart as a client or at specific position, isn't it ?
I'm asking to you in order to prepare a code that does that.
Re: TeeCHart Display problem for Xamarin.iOS
Hello,
ok, would you be so kind to post here the lines of code that shows how you're adding the Chart to the View (or into the UIImageView) ? You should take the ImageView Frame as reference to set the TChart frame.
ok, would you be so kind to post here the lines of code that shows how you're adding the Chart to the View (or into the UIImageView) ? You should take the ImageView Frame as reference to set the TChart frame.
Pep Jorge
http://support.steema.com
http://support.steema.com