# Drawing a curve using a mouse

**URL:** <https://forum.inductiveautomation.com/t/drawing-a-curve-using-a-mouse/11964>\
**Category:** Ignition\
**Created:** [July 22, 2016, 5:32pm UTC](https://forum.inductiveautomation.com/t/drawing-a-curve-using-a-mouse/11964 "2016-07-22T17:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@David](https://forum.inductiveautomation.com/u/David)\
**Post date:** [July 22, 2016, 5:32pm UTC](https://forum.inductiveautomation.com/t/drawing-a-curve-using-a-mouse/11964/1 "2016-07-22T17:32:37Z")

</div>

I don’t know if a paintable canvas is the way to go with this, but I’d like to build a screen where a user can hold down a mouse and trace a line/curve across an empty ‘chart’ (for lack of a better word), resulting in a line.

Another scenario is I would take a dataset of paired x,y values (about 50 total) – something like  
1,2.0  
2,1.9  
3,2.1  
4,1.1  
etc etc. This I would graph out, and they could use the mouse to either drag the line up or down (as a way of entering a new value) or alternatively click to indicate a new value.

In both cases, after they have either drawn a line from scratch, or edited the line I provide them, I would like to then capture the new data and send it to a database.

Any ideas on how to get there? I’ve downloaded the sample project at [https://inductiveautomation.com/forum/viewtopic.php?f=70&t=15425&p=56802&hilit=canvas#p56802](https://inductiveautomation.com/forum/viewtopic.php?f=70&t=15425&p=56802&hilit=canvas#p56802)  
but I haven’t dived in enough to see if it can help. thx.
