剑道图表在手机上的滚动问题 [英] Scrolling issue with kendo chart on mobile
问题描述
我有多个启用了平移和缩放功能的剑道图表.在移动设备视图上,每个图形占用100%的宽度,并且由于启用了平移和缩放功能,因此不会触发触摸事件,因此在移动设备中不会向上或向下滚动.我尝试附加事件处理程序,但无济于事.我想在图像中突出显示的图表区域以外(图表或空白区域)以外的地方触发触摸事件时启用浏览器触摸事件.
I have multiple kendo charts with panning and zooming enabled. On the mobile view, each graph takes up 100% width and since panning and zooming is enabled, the touch events are not fired and hence, no scrolling up or down in mobile. I tried attaching an event handler but to no avail. I want to enable browser touch events when the touch event fires from somewhere other than the chart area (legends or blank spaces) as highlighted in the image.
推荐答案
我遇到了类似的问题,并且可以通过将k-chart-surface
touch-action
从无覆盖为自动
I had a similar issue and I was able to fix it by overriding the k-chart-surface
touch-action
, from none to auto
.k-chart-surface {
touch-action: auto !important;
}
https://developer.mozilla.org/en -US/docs/Web/CSS/touch-action
""触摸操作 CSS属性设置触摸屏用户如何操作元素的区域(例如,通过缩放内置在浏览器中的功能)."
"The touch-action CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser)."
希望它对您有帮助, 问候
Hope it helps you, Regards
这篇关于剑道图表在手机上的滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!