Issue with Axis HorizontalLocation in Xamarin.Forms using Telerik Chart

1 Answer 30 Views
Chart Chart - Xamarin.Android
Equitec
Top achievements
Rank 1
Equitec asked on 14 Nov 2024, 06:38 AM

Dear Telerik Support Team,


I am experiencing a Java.Lang.IncompatibleClassChangeError in my Xamarin.Forms app when setting verticalAxisBar.HorizontalLocation = Com.Telerik.Widget.Chart.Engine.Axes.Common.AxisHorizontalLocation.Right in the Android APK. Removing this line stops the crash, but the axis defaults to the left, which isn’t ideal for my layout requirements, as I need it aligned to the right.

I’ve tried downgrading the Telerik library, but the issue persists. Could you advise if there’s a workaround or an alternative approach for setting the axis location to the right in Android builds?

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 14 Nov 2024, 01:29 PM

Hello,

We have not been reported such exception before. Please specify in which Telerik version the app works and in which it does not. 

Due to axis position, you can change the position in Xamarin.Forms Chart definition, you do not need a custom renderer:

    <telerikChart:RadCartesianChart>
        <telerikChart:RadCartesianChart.HorizontalAxis>
            <telerikChart:CategoricalAxis PlotMode="OnTicks" 
                                      MajorTickInterval="2" 
                                      GapLength="0.5"/>
        </telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:RadCartesianChart.VerticalAxis>
            <telerikChart:NumericalAxis LabelFitMode="MultiLine" Location="Right" />
        </telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:RadCartesianChart.Series>
            <telerikChart:BarSeries ItemsSource="{Binding Data}" 
                                ValueBinding="Value"
                                CategoryBinding="Category"/>
        </telerikChart:RadCartesianChart.Series>
    </telerikChart:RadCartesianChart>

If the case is different, open a support ticket ad attach a sample project where I can review the exact setup.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Chart Chart - Xamarin.Android
Asked by
Equitec
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or