Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAUI iOS charts prevent scrolling and tooltip visibility #1289

Closed
jai-io opened this issue Oct 2, 2023 · 4 comments
Closed

MAUI iOS charts prevent scrolling and tooltip visibility #1289

jai-io opened this issue Oct 2, 2023 · 4 comments
Labels
ios maui priority 0 needs to be fixed asap.

Comments

@jai-io
Copy link

jai-io commented Oct 2, 2023

Bug Description
When a line-based chart is situated within a scrollview, attempting to initiate a scroll directly from the chart seems to disable any scrolling functionality. Additionally, interactions with individual points within the chart, such as clicks, are not recognized, thus failing to activate the tooltip. However, dragging actions within the chart area do successfully activate the tooltip.

To Reproduce
XAML:

<ContentPage.Content>
        <ScrollView>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="300" />
                    <RowDefinition Height="300" />
                    <RowDefinition Height="300" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <maui:CartesianChart
                        ZoomMode="None"
                        Series="{Binding Series}"
                        Title="{Binding Title}" />
                </Grid>
                <Grid Grid.Row="1" Padding="0,100">
                    <Label Text="Section 1 - Test Scrolling"></Label>
                </Grid>
                <Grid Grid.Row="2" Padding="0,100">
                    <Label Text="Section 2 - Test Scrolling"></Label>
                </Grid>
            </Grid>
        </ScrollView>
</ContentPage.Content>

Viewmodel:

public ISeries[] Series { get; set; } =
    {
        new LineSeries<double>
        {
            Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },
            Fill = null
        }
    };

public LabelVisual Title { get; set; } =
        new LabelVisual
        {
            Text = "My chart title",
            TextSize = 25,
            Padding = new LiveChartsCore.Drawing.Padding(15),
            Paint = new SolidColorPaint(SKColors.DarkSlateGray)
        };

Expected Behaviour
Dragging on the chart should allow scrolling functionality. Additionally, clicking on individual data points within the chart should activate the tooltip.

Device and Versions
iOS Emulator Version: 15.0 (1015.2)
iOS Operating System: 17.0
MAUI: 8.0.0-rc.1.9171/8.0.100-rc.1
.NET: .NET 8.0.100-rc.1.23463.5

@jai-io jai-io changed the title MAUI iOS charts prevent scrolling and tooltip visibility issue MAUI iOS charts prevent scrolling and tooltip visibility Oct 2, 2023
@hwsmo
Copy link

hwsmo commented Oct 27, 2023

Hi, I can also confirm this bug.

@beto-rodriguez
Copy link
Owner

Have you tried this on Android? it seems to work properly on Android for me.

@beto-rodriguez beto-rodriguez added priority 1 might not be fixed in the next release of the library, but it will soon! and removed priority 0 needs to be fixed asap. labels Oct 31, 2023
@hwsmo
Copy link

hwsmo commented Nov 1, 2023

You're right, there's no problem on Android. The bug seems to only exist on iOS.

@beto-rodriguez beto-rodriguez added priority 0 needs to be fixed asap. and removed priority 1 might not be fixed in the next release of the library, but it will soon! labels Nov 8, 2023
@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Nov 12, 2023

This is now working properly in the latest release (rc2).

This issue is not completely fixed on Android, but we can track the Android fix at #1343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ios maui priority 0 needs to be fixed asap.
Projects
None yet
Development

No branches or pull requests

3 participants