You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/05/11 11:26:45 UTC
[GitHub] [echarts] 649733108 opened a new issue, #17012: [Bug] 无限循环触发tooltip
649733108 opened a new issue, #17012:
URL: https://github.com/apache/echarts/issues/17012
### Version
5.3.2
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
我的需求是点击chart_a的某个点后,在chart_b中也能显示tooltip;
我在chart_a的tooltip中进行了如下配置后,当点击图A的某个点后,在console中会出现无数次打印;
是否不能在formatter中调用chart_b的dispatchAction?
tooltip: {
show: true,
trigger: "axis",
axisPointer: {
type: "line"
},
alwaysShowContent:true,
triggerOn:'click',
formatter:function (params) {
console.log(params)
chart_rsrp.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: params[0].dataIndex
});
var res = '<div style="margin-bottom: 2px">'+params[0].axisValueLabel+'</div>'
for (var i = 0 ; i < params.length ; i++){
// console.log(params[i])
res += '<div>'
res += params[i].marker
res += params[i].seriesName + '\t'
res += '<div style="display: inline-block; float: right; font-weight: bold">'+params[i].data.sequence+'</div>'
res += '</div>'
}
return res
}
},
### Current Behavior
chart_a无限触发tooltip
### Expected Behavior
点击chart_a的某个点后,在chart_b中也能显示tooltip;
### Environment
```markdown
- OS:windows
- Browser:chrom
- Framework:html+js
```
### Any additional comments?
1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 649733108 closed issue #17012: [Bug] 无限循环触发tooltip
Posted by GitBox <gi...@apache.org>.
649733108 closed issue #17012: [Bug] 无限循环触发tooltip
URL: https://github.com/apache/echarts/issues/17012
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on issue #17012: [Bug] 无限循环触发tooltip
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17012:
URL: https://github.com/apache/echarts/issues/17012#issuecomment-1123611890
@649733108 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] An infinite loop triggers a tooltip
**BODY**
### Version
5.3.2
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
My requirement is to display the tooltip in chart_b after clicking a certain point in chart_a;
After I made the following configuration in the tooltip of chart_a, when I click on a certain point in Figure A, countless prints will appear in the console;
Is it not possible to call the dispatchAction of chart_b in formatter?
tooltip: {
show: true,
trigger: "axis",
axisPointer: {
type: "line"
},
alwaysShowContent:true,
triggerOn:'click',
formatter:function (params) {
console.log(params)
chart_rsrp.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: params[0].dataIndex
});
var res = '<div style="margin-bottom: 2px">'+params[0].axisValueLabel+'</div>'
for (var i = 0 ; i < params.length ; i++){
// console.log(params[i])
res += '<div>'
res += params[i].marker
res += params[i].seriesName + '\t'
res += '<div style="display: inline-block; float: right; font-weight: bold">'+params[i].data.sequence+'</div>'
res += '</div>'
}
return res
}
},
### Current Behavior
chart_a triggers tooltip infinitely
### Expected Behavior
After clicking a point in chart_a, the tooltip can also be displayed in chart_b;
### Environment
````markdown
- OS: windows
- Browser:chrom
- Framework:html+js
````
### Any additional comments?
1
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org