You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "helgasoft (via GitHub)" <gi...@apache.org> on 2024/11/14 19:51:18 UTC
[I] graph _draggable:true_ with legend problem [echarts]
helgasoft opened a new issue, #20518:
URL: https://github.com/apache/echarts/issues/20518
### Version
5.5.1
### Link to Minimal Reproduction
[Example](https://echarts.apache.org/examples/en/editor.html?c=graph-force&code=LYTwwgFghgTgLgOgM4QPYHcAyqoBMCWAdgOYAUAlANwBQAJAsQKZykBKA8uwCoD6ACgEEuACQAEAalEByAPS4ocKDKhIkzOQqUAbRkgC0wfGphQARjqQIAVklSEpAGlEAzAK6EAxnHx3RpYiYADhDkogDe1KKioJCwiBD4uIzYeERkVJGiAVDBCISoSZbOqDAAolAeEKRunt6-pPlJoRFRUY2MyCDApqhaAMr4AF6MogC8ogCMEzRRAL4ZmaiBdYRj4ZlRphUA1gGo7rhgvSUAXFLmO46iG6LecDon662tcIwAHnCPUpi6ogCyRkYJnMukcNyiSFcpleHy-ABFGM4oK4tHBRFooCB9nAwc8onAll8enACcBcXidM5PtIYPhiBAcTdZg4bgTet5Ao8wsybjomIRcI8ANrgp54qIyGSiNQ6LyMXB_AqML5INI6cni-SKR7ZXIeBSMYglfC6BDAHLVdxeHyrUhQZqi54wZiuGCrKB5KDARgzcWieai2Y3AC6LOexhNSGFopafsIXuV0h-SH-gOBFg1eLgIECiakuogmeekoxWNc1KkxRgHkYRdakqrNa5omdgRRqrsjwmAAZu_6w37S9ivvlCLWB5qTMRiGYHrcYK5GBO8VqoDqghA8kqkMvnloiNso1kNwh94RD7vWvrXkbabp1zlN9fDcbdJeojAcMBHnAF0vHeiZiMFoXIAVEgSoKqKxfLS9KMn6_qBiGmSzL6MTQPAyDMOwyw2qQSwrBk8yUEAA)
### Steps to Reproduce
drag some nodes and select a category from legend
### Current Behavior
After dragging some nodes and selecting a category from legend, all nodes are reset to their **original positions**, i.e. the manual repositioning is lost.
I wouldn't call it a bug, but it isn't right behavior either. Why bother to rearrange a graph when a simple legend click will reset it?
### Expected Behavior
Legend is about node **visibility** only and should not affect node **positions**.
### Environment
```markdown
- OS: win 10
- Browser: Chrome
- Framework: none
```
### Any additional comments?
The documentation for [draggable](https://echarts.apache.org/en/option.html#series-graph.draggable) says:
_"Note that this option is only available when using [force-directed layout](https://echarts.apache.org/en/option.html#series-graph.force) before v5.4.1."_
But _draggable_ works for _layout:'none'_ too and makes sense **only** in this context.
--
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
Re: [I] graph 'draggable:true' with legend problem [echarts]
Posted by "riteshjagga (via GitHub)" <gi...@apache.org>.
riteshjagga commented on issue #20518:
URL: https://github.com/apache/echarts/issues/20518#issuecomment-2508456969
I get the same issue.
Additionally, nodes reset to their original positions when I try to use `setOption` method to update some linkStyle on `onmouseover` event. I think it is a similar situation: whether mouseover on the chart or click on the legend.
I do not know how can I get the draggable positions to provide them while calling `setOption` as a means to update the nodes with the dragged positions.
--
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
Re: [I] graph 'draggable:true' with legend problem [echarts]
Posted by "riteshjagga (via GitHub)" <gi...@apache.org>.
riteshjagga commented on issue #20518:
URL: https://github.com/apache/echarts/issues/20518#issuecomment-2518164173
Wow! That's good to know. Thank you for sharing the code.
--
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
Re: [I] graph 'draggable:true' with legend problem [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20518:
URL: https://github.com/apache/echarts/issues/20518#issuecomment-2510299200
> how can I get the draggable positions to provide them while calling `setOption` as a means to update the nodes with the dragged positions.
good idea, @riteshjagga 👍 Here is a hack to do that - [Demo](https://echarts.apache.org/examples/en/editor.html?helgasoft=graph+drag+nodes+persistent+positions&code=PTAEGMHsDsBcCcCWAjArrRNTIJ6gBYCmANgOYCGAzpAGawB0UAtgFAAm5s5oAvKANotQoAN5DhoaOSaEAXKADkAOUhtCoAIwKANOOHhOhUpHg55CgII69oAB7yAzAAYnuiaDOhnT8QF83ojZSMuYqaqAATNbuBrBGJp6W0RL2oAAcLgHCnt5-AWLuwXKKYeoOyfqGxqbmAEIVdvIArE2uNp4aLnniBRJFoarqACwNsfE1ivVZjaAtbe6erT7CviwAugDcLJAADhhYfL0YsMTFvcKUqMhxtrDmACLw5KQUyKeSg5SgAO6IsPigHaEeCURCUOJwQGQUH7aCUBTdYSwSCQYgYHbyET-cSnUiEaBsTFIUj4O4RCLY4TkaCIJicTDQe6oJ6wgCqOw4cXkGiWAWptPpMAAolRENBSOzOcUFABHVBijDgACS0AA8uhkpRgYhCJR5IJ3OcJLAcEDzKQnjt8A1hMRyDhIOhzNAYIQbaBKDgmMhUQBlRAAL2KrWmwjYTxe5DexQQqEIodA8Eg0nksfjNltUZImMo-Eg31T8DjlPcoEIbDxvq9PuI-oU4EQ8HApx0inI8CT3wUawT5cr1b9geK_CG2k0Th7GbLFcIABks7XRMIaDBYP6g9yAGygEsxKomHV6gQiSTSaVWHdjk_9SYKHeT0ugTnkXRT4higDWR4Nj8Cv4k1DMuAxTzP-oBcPAeJ3JoCbuJ63qDhuAhNGOEQTrBEh2sg2Z_mBFx5gW4FFoQU7uLuv7vtAhC-iapyYqRpa_Gw_zNBhMTMgAbviupHk49ARAxKwMeRhqCR6jpNtKpSRO67gQ
VBAzhFobGgFhOFGv-ub5oWcZiSJpaUdRtFnGJ-icdxlC8fxenCRhGmloBkmKeoylifJhDQcogxeAi_76cI9lwRJwHOTJKnuZ50nlLZDGBQBwVSd5UThe2CklN5Iwxf-cUXAloWuXhEWhZlflTg-BlikZOB0bhj67OQDYmvIfEAJwYUxLGRBh4DmVRlnNVOqxkeIawsL4WxMDgADC-DtgwMAABQKEwjpaqgOytjQqDQOAsKgAtOzttIlAAJS4VAcKwFCCpfHwk0zXN9BQQAsoMxALSdT0eb62q6rUOAqmotgLU4n1QfcnDkB99AAPp_IQTDzg66CUFsYaQ_QK7wCK4D4AtC1sGwY6IGdPAAHy1U-bD0LYvDXXAlD8Igaz8BOaMSIT9B4HwOyQDdTMsxomx-Cd7P3bN8AMFqsCqnsDILSeWpILq-ons-947qLY2i0AA)
--
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