On iOS devices if you have only 1 Series for Rad Cartesian Chart, series Name is cutoff(horizontally and vertically, depends where are you putting Categorical Axis)
Yes, the string. Empty is a workaround for the X-axis, For Y-axis I can suggest the following:
public class CustomChartRenderer : CartesianChartRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<RadCartesianChart> e)
{
base.OnElementChanged(e);
if (this.Control != null)
{
this.Control.YAxis.Title = " ";
}
}
}
where the space between the double quotes is the characters needed to visualize the value of the axis label.
For example, in my case the text for the axis label is Data1, so I left 5 blank space characters.
This is the approach I can suggest. I hope it will be helpful for the scenario you have.
Regards, Author nickname
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).
Stefan
Posted on:25 Sep 2020 14:05
Hi Didi,
Thank you for update but this only resolves value on X axis.
When i use horizontal bars then its not helping.(i tried to put Yaxis.Title = string.Empty) but its not helping.
using Telerik.XamarinForms.Chart;
using Telerik.XamarinForms.ChartRenderer.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(Telerik.XamarinForms.Chart.RadCartesianChart), typeof(CustomChartRenderer))]
namespacegauge.iOS
{
publicclassCustomChartRenderer : CartesianChartRenderer
{
protectedoverridevoidOnElementChanged(ElementChangedEventArgs<RadCartesianChart> e)
{
base.OnElementChanged(e);
if (this.Control != null)
{
this.Control.XAxis.Title = string.Empty;
}
}
}
}
Regards,
Didi
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).