Disable touch events on Telerik Chart

0 Answers 3 Views
Charts
Kevin
Top achievements
Rank 1
Kevin asked on 10 Jun 2025, 08:46 AM

I am using a Column Chart component inside my Blazor application.

When viewed on a mobile screen, the user is unable to pan the window, because i think the chart registers this as an event. If the user touches the chart, they cannot scroll the window anymore.

I am not using any additional events on my chart, it does not need any interaction. 

How can I adjust the chart so that it can be touched and scrolled?

 

Code snippet:
<div style="@((DialogOpen) ? "visibility: hidden;" : "visibility: visible;")">
    <TelerikChart Height="200px">
        <ChartZoomable Enabled="false"></ChartZoomable>
        <ChartPannable Enabled="false"></ChartPannable>

        <ChartSeriesItems>
            <ChartSeries Type="ChartSeriesType.Column" Name="min/100m" Data="@GraphData" Field="@nameof(GraphData)" Color="#9edfff">
            </ChartSeries>
        </ChartSeriesItems>

        <ChartCategoryAxes>
            <ChartCategoryAxis Categories="@GraphX.ToArray()"></ChartCategoryAxis>
        </ChartCategoryAxes>

        <ChartLegend Position="ChartLegendPosition.Bottom">
        </ChartLegend>

        <ChartTitle Text=""></ChartTitle>
    </TelerikChart>
</div>

Hristian Stefanov
Telerik team
commented on 10 Jun 2025, 12:52 PM

Hi Kevin,

You can disable the touch actions on the Chart by applying the CSS shown below. Please give it a try and let me know if it covers your needs.

<style>
	.k-chart {
		pointer-events: none;
		touch-action: none;
	}
</style>

Best regards,

Hristian

Kevin
Top achievements
Rank 1
commented on 10 Jun 2025, 03:11 PM

Hello Hristian,

That indeed resolves my request, thank you!

Is it also possible to disable touch actions on the entire chart, except for the bars that represent data? If I want to handle a touch or click event on a specific bar, do you have an example for that as well?

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Kevin
Top achievements
Rank 1
Share this question
or