Telerik RadPieChart blocks refreshview

1 Answer 80 Views
Chart
inLogic
Top achievements
Rank 1
inLogic asked on 29 Aug 2023, 12:09 PM

Hi, I have a refreshview with a grid that contains a some labels, a RadPieChart and a CollectionView.

However the existence of the RadPieChart disables the functions of the refreshview on the collectionview. If i replace it with a boxview that has the same view properties set it works fine, but then i'm missing the chart.

It seems like there is some kind of override on the refreshview from the chart. Is there a way to fix this?

<!--<BoxView x:Name="boxtest" Grid.Row="4" BackgroundColor="Red" VerticalOptions="Fill" IsEnabled="False" Margin="0, 16"> </BoxView>--> <telerik:RadPieChart Grid.Row="4" x:Name="AbsencePieChart" BackgroundColor="Red" VerticalOptions="Fill" Palette="{Binding Path=PieChartDataPoints, Converter={StaticResource PieChartToChartPalette}}" IsEnabled="False" Margin="0, 16"> <telerik:RadPieChart.Series> <telerik:PieSeries ItemsSource="{Binding Path=PieChartDataPoints}" ValueBinding="Value" /> </telerik:RadPieChart.Series> </telerik:RadPieChart>

1 Answer, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 29 Aug 2023, 05:50 PM

Hello inLogic team,

What exactly do you mean by "overrides", the user can't pull down the RefreshView? This is expected because the Chart has support for gestures, so you're nesting multiple gesture supporting controls together.

The first/top level control is always going to get the gesture first, here's a mockup of the Y index stack:

Option 1a - My recommendation is to just put something transparent on top of the Chart so that it gets the user's gesture instead. For example, a Grid has a transparent background by default

<DataTemplate>
    <Grid>
        <telerik:RadPieChart Grid.Row="4"
                             x:Name="AbsencePieChart"
                             BackgroundColor="Red"
                             VerticalOptions="Fill"
                             Palette="{Binding Path=PieChartDataPoints, Converter={StaticResource PieChartToChartPalette}}"
                             IsEnabled="False"
                             Margin="0, 16">
            <telerik:RadPieChart.Series>
                <telerik:PieSeries ItemsSource="{Binding Path=PieChartDataPoints}"
                                   ValueBinding="Value" />
            </telerik:RadPieChart.Series>
        </telerik:RadPieChart>

        <Grid x:Name="TransparentGridOnTopOfChart"  Grid.RowSpan="TotalRowCount" />
    </Grid>
</DataTemplate>

This is a mockup of how the transparent overlay works:

Option 1b - Or you can use what you've already discovered, a BoxView:

<DataTemplate>
    <Grid>
        <telerik:RadPieChart Grid.Row="4"
                             x:Name="AbsencePieChart"
                             BackgroundColor="Red"
                             VerticalOptions="Fill"
                             Palette="{Binding Path=PieChartDataPoints, Converter={StaticResource PieChartToChartPalette}}"
                             IsEnabled="False"
                             Margin="0, 16">
            <telerik:RadPieChart.Series>
                <telerik:PieSeries ItemsSource="{Binding Path=PieChartDataPoints}"
                                   ValueBinding="Value" />
            </telerik:RadPieChart.Series>
        </telerik:RadPieChart>

        <BoxView BackgroundColor="Transparent" Grid.Row="4" />
    </Grid>
</DataTemplate>

Option 2 - Or as a final possibility, just disable all input gestures by setting InputTransparent=True for the chart.

<DataTemplate>
    <Grid>
        <telerik:RadPieChart InputTransparent="True" 
                             ...>
        </telerik:RadPieChart>
    </Grid>
</DataTemplate>

If this doesn't help, then there's something very specific about your current implementation that requires direct review by the engineering team. Please open a Support Ticket and share all of the relevant code files so we can replicate the issue directly (please also be very specific about which platform you're targeting and which version the SDK is).

Regards,
Lance | Manager Technical Support
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Lance | Senior Manager Technical Support
Telerik team
commented on 29 Aug 2023, 06:30 PM

As a quick follow up comment, if you do not have chart gestures enabled, then it works fine without any adjustments. I've attached a sample project to demonstrate that you can scroll with the finger on the chart, and trigger the RefreshView's refresh command.

You will see all of the charts in the list get updated after the refresh cycle completes (2000 milliseconds).

inLogic
Top achievements
Rank 1
commented on 30 Aug 2023, 08:45 AM

Hi, I seem to have forgotten to write that the issue is specifically on iOS, Works fine on android.

I have also tried input transparent, clearing both behavior lists and the boxview over the chart.

Also unlike your example, my chart isn't inside a collectionview, but share the same grid(not same row) as it.

I also tried removing any code other than the refreshview, grid and chart. still doesn't refresh on iOS.

Also It may be an issue with the radtabview as the page is 1 of 4 tabs on a radtabview, though my other tabs with refreshview work fine. and so did this one until I added the piechart.

 

I have made a support ticket with as much info as i could think of without giving my actual files. 1621801

Tags
Chart
Asked by
inLogic
Top achievements
Rank 1
Answers by
Lance | Senior Manager Technical Support
Telerik team
Share this question
or