klinecharts / KLineChart

📈Lightweight k-line chart that can be highly customized. Zero dependencies. Support mobile.(可高度自定义的轻量级k线图,无第三方依赖,支持移动端)
https://klinecharts.com/
Apache License 2.0
2.39k stars 602 forks source link

Draggable Tags #251

Closed olablt closed 1 year ago

olablt commented 2 years ago

Hello,

is there a code snippet to modify the tag and make it draggable vertically?

like in this example https://jsfiddle.net/randalhsu/5un8r93g/

liihuu commented 2 years ago

Drag is not supported yet.

XYUU commented 2 years ago

This function may be supported in the next version. I made a similar function, but through the price line.

olablt commented 2 years ago

This function may be supported in the next version. I made a similar function, but through the price line.

can you share the code?

XYUU commented 2 years ago

const shape= { name: "priceLine", lock: false, mode: "weak_magnet" } chart.createShape(shape, "candle_pane")

olablt commented 2 years ago

const shape= { name: "priceLine", lock: false, mode: "weak_magnet" } chart.createShape(shape, "candle_pane")

is it possible to restrict the dragging to vertical only?

liihuu commented 1 year ago

V9 supported.