Home Forums Chart Support Draggable point

Draggable point

Viewing 2 posts - 1 through 2 (of 2 total)
  • #6894

    Hello Everyone,
    is there any way to make a point on the chart draggable?

    I’m tring to figure out by myself using click and mousemove events,
    but I didn’t found a method to get the new Y using a proportion between
    Y and datapoint.Y, I don’t think this could work because Y is the value
    that starts from the upper left corner of the canvas instead datapoint.Y starts from
    the chart bottom (correct me if I mistake).

    Anyone ever tried to achieve such task?

    Thanks

    #6895

    I did it using column chart type,
    using both click event to enable ‘edit mode’ and mousemove to increase/decrease the bar value,
    depending on the Y difference between the latest and current mouse position.

    Can see my solution here https://github.com/kaiohken1982/Chart

    Any advice on how to improve this solution are welcome :)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.