Unplanned
Last Updated: 02 Jan 2023 09:44 by Sebastian
Sebastian
Created on: 02 Jan 2023 09:44
Category: Chart
Type: Feature Request
0
Chart: [iOS] [MacCatalyst] Make y axis line visible by default in all series

On some chart series like, bar, line, scatter line, etc, the y axis line is hidden. make it visible, as it is on Android and Windows. 

Current solution is to use the chart handler changed and set YAxis.Style.LineHidden to false.

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();

        this.chart.HandlerChanged += this.Chart_HandlerChanged;
    }

    private void Chart_HandlerChanged(object sender, EventArgs e)
    {
        this.UpdateChart();
    }

    private void UpdateChart()
    {
        var platformView = this.chart.Handler.PlatformView;
#if IOS || MACCATALYST
        var platformChart = (Telerik.Maui.Controls.Compatibility.ChartRenderer.iOS.TKExtendedChart)platformView;
platformChart.YAxis.Style.LineHidden = false;
#endif
    }
}

0 comments