ios饼图设置pieLabel & triggerOn: 'touchend',但是按住饼图短距离滑动的时候会触发 touchend,怎么解决?
Open
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
如题,因不可直接设置 triggerOn: 'click' 触发 onclick 事件,于是设置了 touch end, 但是短距离滑动的时候会触发 touchend,怎么解决?
chart.pieLabel({
// @ts-ignore
labelCfg: function (data, color) {
return {
text: showValue ? ${data.type} ${data.value}% : data.type,
};
},
onClick(e) {
let { data } = e;
_this.props.onTabPieCate(data);
},
triggerOn: 'touchend',
});
Contributor guide
Research direction
Start at the pieLabel configuration shown in the report and reproduce the interaction on iOS with a short drag and a tap. Trace how triggerOn: 'touchend' reaches the onClick callback; done means a short drag does not invoke the callback while a tap still does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100