junjielyu13 commented on issue #5132:
URL: https://github.com/apache/echarts/issues/5132#issuecomment-1794683608
可以提供水平拖动具体的代码吗, 无论怎么修改位置,都无法改变任意拖动
```javascript
graphic: [
{
type: 'line',
shape: {
x1: movableLineX,
y1: movableLineY,
x2: movableLineX,
y2: movableLineY + 180
},
style: {
stroke: 'red',
lineWidth: 2
},
cursor: 'move',
draggable: true,
ondrag: function(params) {
// Update the X position of the movable line
movableLineX = params.event.offsetX;
console.log(`Movable Line Position - X:
${movableLineX}, Y: ${movableLineY}`);
// Update the chart
myChart.setOption(options);
// You can perform other actions here based on the
new position
}
}
]
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]