amiraziz opened a new issue #12511:
URL: https://github.com/apache/incubator-echarts/issues/12511
### Version
4.7.0
### Steps to reproduce
when i click on node for second time, it not fire click event but when i
click on edge it works!
` const chart = document.getElementById('graphContainer');
const myChart = echarts.init(chart);
const option = {
tooltip: {show: true, formatter: "{c0}"},
animationDuration: 100,
animationEasingUpdate: 'elasticInOut',
series: [{
type: 'graph',
layout: 'force',
animation: false,
symbolSize: [30, 30],
animationDurationUpdate: 0,
emphasis: {
itemStyle: {
borderColor: null,
borderWidth: null,
color: "#2359c0",
shadowBlur: null,
shadowColor: "rgba(0, 0, 0, 0.3)"
}
},
label: {
position: 'right',
formatter: '{b}'
},
draggable: true,
data: result.nodes,
force: {
edgeLength: 150,
gravity: 0.1,
repulsion: 250,
},
edges: result.links,
edgeSymbol: ['arrow'],
edgeLabel: {fontSize: 10},
focusNodeAdjacency: true,
roam: true,
lineStyle: {opacity: 0.9, width: 1.5, curveness: 0.1, color:
'#682F2F'}
}]
};
myChart.setOption(option);
myChart.on('click', function (params) {
console.log(params); // do whatever you want with another chart say
chartTwo here
if (params.dataType === 'edge') {
} else if (params.dataType === 'node') {
}
alert("chartOne clicked");
});`
### What is expected?
click event fire every time i click on graph node
### What is actually happening?
i need preview extra info about node, not only for first time.
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]