Hi ,
When I make a zoom, I would like to trace a selection rectangle on the canvas of the graph. Here is a picture :
http://cjoint.com/?cimhAKO5v7
TIA !
Cordially,
Rodrigue
[ZOOM] Selection rectangle
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rodrigue,
You can do it using the Color Bands tool, you will find some examples of it in the features demo included with the TeeChart installation.
You can do it using the Color Bands tool, you will find some examples of it in the features demo included with the TeeChart installation.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
I've did it but it's very slow !
So I've made this code :
I've to hide/unhide the rectangle of selection but it works !
It is not as slow as by using the colorband but it is always slow.
I believe that the solution is more simple. My only question is :
Where to specify the color of the background rectangle selection who is draw when we zoom?
http://cjoint.com/?cirRvDHApp
http://cjoint.com/?cirR524NK7
Cordially,
Rodrigue
I've did it but it's very slow !
So I've made this code :
Code: Select all
void __fastcall TForm1::Chart1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if(Shift.Contains(ssLeft))
{
XStartPos = X;
XStopPos = X;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
if(Shift.Contains(ssLeft))
{
XStopPos = X;
Chart1->Invalidate();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chart1BeforeDrawAxes(TObject *Sender)
{
Chart1->Canvas->Rectangle(XStartPos, Chart1->LeftAxis->IStartPos, XStopPos, Chart1->LeftAxis->IEndPos);
}
//---------------------------------------------------------------------------
It is not as slow as by using the colorband but it is always slow.
I believe that the solution is more simple. My only question is :
Where to specify the color of the background rectangle selection who is draw when we zoom?
http://cjoint.com/?cirRvDHApp
http://cjoint.com/?cirR524NK7
Cordially,
Rodrigue
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rodrigue
You can do it before drawing the rectangle setting Canvas Pen and Brush colors as:Where to specify the color of the background rectangle selection who is draw when we zoom?
Code: Select all
void __fastcall TForm1::Chart1BeforeDrawAxes(TObject *Sender)
{
Chart1->Canvas->Pen->Color=clRed;
Chart1->Canvas->Brush->Color=clBlue;
Chart1->Canvas->Rectangle(XStartPos, Chart1->LeftAxis->IStartPos,
XStopPos, Chart1->LeftAxis->IEndPos);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
Thanks for your reply. I found easier :
(idem for color's Pen)
I've a problem of blink now !
I try to set :
But it's doesn't solve the problem ...
Very cordially,
Rodrigue
Thanks for your reply. I found easier :
Code: Select all
Chart1->Zoom->Brush->Color = clBlue;
I've a problem of blink now !
I try to set :
Code: Select all
Chart1->DoubleBuffered = true;
Very cordially,
Rodrigue
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rodrigue,
I'm afraid there's no solution by now. I've included it on our wish list to be considered for future releases.I've a problem of blink now !
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |