Hello
We have 2 charts in carousel
Chart.XAxis.AllowZoom = true;
Chart.XAxis.AllowPan = true;
Chart.AllowTrackball = true;
Chart.AllowPanDeceleration = true;
When we get into selected chart in the carousel
We add the relevant series and clear the previous chart series
This is the unhandled exception we get from the chart and the application crush
ios chart throw
exceptiFoundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[__NSPlaceholderArray initWithCapacity:]: capacity (2147483646) is ridiculous
Native stack trace:on
0x0041dbfc -[TKChartGridRender drawInContext:] + 380
if we turn off the AllowZoom and AllowPan This exception not exists
Chart.XAxis.AllowZoom = false;
Chart.XAxis.AllowPan = false;
How to handle this exception
Best Regards
Hi,
My charts are not showing in iOS, but do show correctly in UWP, and mostly correct in Android. I've used both the Visual Studio Simulator, and the simulator on the MacBook and the results are the same.
In iOS, just the labels and Axis lines render. My AppDelegate.cs file is setup correctly (below). My environment is:
Xcode 8.2.1 (8C1002)
Xamarin Studio 6.2 (build 1821).
Xamarin Forms: 2.3.4.192-pre2
Telerik.UI.for.Xamarin 2017.1.10217.5
SkiaSharp (Views, Forms) 1.56.1
I don't see any entries in the iOS log related to either the data, or Telerik, or chart.
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using Prism.Unity;
using Microsoft.Practices.Unity;
using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Microsoft.Azure.Mobile.Crashes;
using Xamarin.Forms;
using CarouselView.FormsPlugin.iOS;
using Telerik.XamarinForms.Common.iOS;
using Telerik.XamarinForms.Chart;
using Telerik.XamarinForms.ChartRenderer.iOS;
[assembly: ExportRenderer(typeof(RadCartesianChart), typeof(CartesianChartRenderer))]
[assembly: ExportRenderer(typeof(RadPieChart), typeof(PieChartRenderer))]
namespace MyNamespace.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
new PieChartRenderer();
new CartesianChartRenderer();
global::Xamarin.Forms.Forms.Init();
TelerikForms.Init();
CarouselViewRenderer.Init();
LoadApplication(new App(new iOSInitializer()));
return base.FinishedLaunching(app, options);
}
}
public class iOSInitializer : IPlatformInitializer
{
public void RegisterTypes(IUnityContainer container)
{
}
}
}
I'm currently evaluating Xamarin UI for my company but I'm having troubles gettings charts to work. Are there any downloadable demos?
Cheers
I'm attempting to have a timer update a Label that happens to be in the MainContent of a RadSideDrawer.
The label looks like:
<StackLayout Grid.Row="0">
<Label x:Name="AgeLabel"/>
</StackLayout>
And the timer looks like:
Device.StartTimer(new TimeSpan(0, 0, 1), () =>
{
AgeLabel.Text = DateTime.Now.ToLocalTime().ToString();
return true;
});
The problem is when the timer expires, the label gets updated okay, but a RadListView on the page at Grid.Row="1" gets messed up. It suddenly changes from full width of the screen to about 1/3 width of the screen. If you tap the screen it will then correct the display, but obviously you can't expect the user to keep tapping the screen.
I have trying using bindings with INotifyPropertyChanged and stuff, but that does not help, when the property updates, the list display gets messed up. I have also tried Device.BeginInvokeOnMainThread to make sure the right thread is updating the screen, also does not help.
Is it possible for a timer to update the MainContent of a SideDrawer? Is this a known issue?
Hi,
We have integrated the SideDrawer for iOS. We have referred the Example project for the same. (In this case, we did it with SideDrawer and UIVIewController)
As per the requirement in the project, we want to implement SideDrawer with TabController. Instead of changing complete implementation we just changed the class it inherits from UIViewController to UITabController and we set the viewControllers property.
Now the problem is that we are not able to get the instance of SideDrawer. We are using following code which return null object.
this.SideDrawer = TKSideDrawer.FindSideDrawer(0, this);
Please guide us how we should resolve this.
Thank you in advance.
Regards,
HI there,
How do you modify the UITextBox editor on TKDataForms to contain ie 5 lines of text, or even more (with scrolling).
I would like to be able to ie. enter a long description ...
Thanks.
I would like to have a ListView grouped by a property indicating active and inactive items. The user is supposed to be able to activate items by dragging them from the group of inactive items to the group of active items. And the user needs to be able to change the order of active items.
Is this possible and if yes how?
In my tests so far I've build an ObservableCollection of items. And grouped the ListView by a string property called "Status".
I can drag Items inside each of the groups. But when I drag an item from one group to the other it gets sorted back to the original group. I guess its because its "Status" Property would need to be updated. But how?
Thanks!
Hi telerik,
I have a Xamarin cross-platform solution with Android, iOS and UWP projects. I'm trying to put a SideDrawer on an application page which has a ScrollView, like this:
01.
<
telerikPrimitives:RadSideDrawer
x:Name
=
"drawer"
DrawerLength
=
"250"
BackgroundColor
=
"{x:Static helpers:AppColors.AppColor50}"
>
02.
<
telerikPrimitives:RadSideDrawer.MainContent
>
03.
04.
<
AbsoluteLayout
VerticalOptions
=
"FillAndExpand"
HorizontalOptions
=
"FillAndExpand"
>
05.
06.
<
Image
Source
=
"BG.png"
AbsoluteLayout.LayoutBounds
=
"0, 0, 1, 1"
07.
AbsoluteLayout.LayoutFlags
=
"All"
Aspect
=
"AspectFill"
08.
Opacity
=
"{x:Static helpers:AppColors.ScreenBackgroundOpacity}"
/>
09.
10.
<
ScrollView
AbsoluteLayout.LayoutBounds
=
"0, 0, 1, 1"
VerticalOptions
=
"FillAndExpand"
11.
AbsoluteLayout.LayoutFlags
=
"All"
>
12.
13.
<
StackLayout
x:Name
=
"mainStack"
VerticalOptions
=
"FillAndExpand"
Spacing
=
"0"
>
14.
15.
<
Button
BackgroundColor
=
"Red"
HeightRequest
=
"100"
Text
=
"1"
></
Button
>
16.
<
Button
BackgroundColor
=
"Red"
HeightRequest
=
"100"
Text
=
"2"
></
Button
>
17.
<
Button
BackgroundColor
=
"Red"
HeightRequest
=
"100"
Text
=
"3"
></
Button
>
18.
<
Button
BackgroundColor
=
"Red"
HeightRequest
=
"100"
Text
=
"4"
></
Button
>
19.
20.
</
StackLayout
>
21.
</
ScrollView
>
22.
23.
</
AbsoluteLayout
>
24.
25.
</
telerikPrimitives:RadSideDrawer.MainContent
>
26.
</
telerikPrimitives:RadSideDrawer
>
On Android and iOS this works fine, but on UWP i realised that if the amount of data to show on the ScrollView fits the screen in Portrait mode, when you switch to Landscape mode the page doesn't scroll if the data shown doesn't fit the screen.
Thanks
Pretty much as the title suggests - is it possible to render a Pie Chart with the donut visualisation using UI for Xamarin components ?
If not, is there a list of which chart variants for bar , pie , etc are actually supported using the chart components ?
-Ian