Page 1 of 1

Moving one of line series and scaling it

Posted: Mon Jun 18, 2007 1:22 pm
by 9641771
I have a tchart component with several line series. Here is what I need to do with theese series.
First:
Moving series up and down using mouse(I mean that I press left mouse button above line and then drag it up or down. All other lines stay at their original positions)
Second:
Scaling line (I mean that I press right mouse button and move mouse up or down, so that line begin stretching or compressing on Y axis. All other lines remain the same without any changes)

It doesn't matter for me how Y coordinates will be represented on Y axis (I want to have Y axis without any labels).
So what do you recommend me to do?

Posted: Mon Jun 18, 2007 1:33 pm
by narcis
Hi bairog,
First:
Moving series up and down using mouse(I mean that I press left mouse button above line and then drag it up or down. All other lines stay at their original positions)
You can do something as shown here.
Second:
Scaling line (I mean that I press right mouse button and move mouse up or down, so that line begin stretching or compressing on Y axis. All other lines remain the same without any changes)


I don't understand what do you exactly want to achieve here. Could you please give us some more information about the desired behaviour?

Thanks in advance.

Posted: Tue Jun 19, 2007 4:32 am
by 9641771
narcis wrote:I don't understand what do you exactly want to achieve here. Could you please give us some more information about the desired behaviour?

Thanks in advance.
Ok, for example I draw a line with such points: {(x1,y1),(x2,y2),(x3,y3),...}. Stretching I mean is redrawing that line (only that but not the others) with points {x1,K*y1),(x2,K*y2),(x3,K*y3),...} where K is for example 1.5, 2, 2.5, 3,....(it is increasing while mouse is moving up).
Compressing I mean is redrawing that line with points {x1,K*y1),(x2,K*y2),(x3,K*y3),...} where K is for example 2, 1.5, 1, 0.5....(it is decreasing while mouse is moving down). So it is inverse operation.

I've read this article
narcis wrote:You can do something as shown here.
and saw that my second problem is esily solving using that code with several changes. :)

So thanks for this neat feature!