This is a migrated thread and some comments may be shown as answers.

cartesian chart and the pan in the XAxis error

3 Answers 53 Views
Chart - Xamarin.iOS
This is a migrated thread and some comments may be shown as answers.
Miro
Top achievements
Rank 1
Iron
Iron
Miro asked on 25 Mar 2021, 06:46 AM
When we try to customise the cartesian chart in the iOS for the xamarin forms, then we are allowing the pan in the XAxis and also trying to set the value of Pan, but whenever I try to set the value of Pan then it is raising an exception. Kindly check it and update me asap.

3 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 25 Mar 2021, 03:16 PM

Hello Amr,

Thank you for sending the screenshot. However, it is insufficient information for us to give you an answer as to why you're getting an exception. I cannot see any code and I cannot attach a debugger to investigate the stack trace.

I'm curious as to why you're using a custom renderer to programmatically pan the chart, this is no longer needed and rather complex.

Instead, please try using the Chart's PanOffset method.

For code examples, please see my latest reply in this forum thread in which I share a simple example that can be done right inside the Xamarin.Forms project layer

    // Assuming the axis is already zoomed in (e.g. Chart1.Zoom = new Size(2, 0)), 
    // you can programmatically pan using PanOffset
    var xOffset = Chart1.Width / 2;
    Chart1.PanOffset = new Point(-xOffset, 0);

Direct Support & Further Investigation

It's critical that we are able to replicate the exception because my testing shows it works as expected. To give you a head start, I have written you a starter project that you can update.

Please take the following steps:

  1. Download my attached demo and update it with your code so that it causes the exception
  2. Close VS2019 and open the project in File Explorer
  3. Delete the bin and obj folders from both projects and ZIP up the entire solution
    • the ZIP file should be < 1MB if you deleted the bin and obj
  4. Open a Technical Support ticket and select UI for Xamarin - Chart (you have a dedicated support license)
  5. Attach the ZIP file to the ticket and explain the steps to reproduce

We will see the ticket come in and I will make sure it is escalated to the correct engineers who can help.

Regards,
Lance | Manager Technical Support
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Miro
Top achievements
Rank 1
Iron
Iron
answered on 05 Apr 2021, 04:11 AM

I am not able to resolve the issue in the iOS also i am not able to achieve the same in the android. So can you please just check the problem where i am facing it. You can check the code in the HRDashbaordPage.xaml and HRDashboardPageViewModel.cs". If you want to have a call with my team then also let me know, we will have it. 

I want to achieve that categorical axis should be scrollable so when there is a lot data then it should not be sticky it should be scrollable.

I can attached the code, but the option extension allowed is only ".jpg, .jpeg, .gif, .png" please me know if it's required to send the code?

0
Didi
Telerik team
answered on 05 Apr 2021, 07:42 AM

Hello Miro,

I am sorry to hear the issue still occurs.

You have to open a support ticket and attach the project there because in the forum only image attachments are allowed. 

Please note that support ticketing system accepts files up to 20MB. In order to reduce the package size, delete bin and obj folders, then archive the project and attach it to the support ticket. 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Chart - Xamarin.iOS
Asked by
Miro
Top achievements
Rank 1
Iron
Iron
Answers by
Lance | Manager Technical Support
Telerik team
Miro
Top achievements
Rank 1
Iron
Iron
Didi
Telerik team
Share this question
or