graph: fix plot dragging

[#54785670]