Hi,
Just drop a chart and a TColorGridSeries, make it random filled.
Add an empty line for ChartClickSeries event like the following,
void __fastcall TForm1::Chart1ClickSeries(TCustomChart *Sender,
TChartSeries *Series, int ValueIndex, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
// abd
}
At runtime, you can't drag zoom or pan if you drag within the color grid plot, but you still can do it if you drag from the empty space near the plot.
Took me a while to figure out 'cause even you comment the lines in that event, the bug still persists. Not sure if it's the case for other 3D series, but at lease 2D ones are fine.
Fang
p.s version 7.06
Bug: While set ChartClickSeries event, Zoom is broken
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Fang,
This is as designed. This happens with all series styles if you try to make zoom by clicking on the series and having the OnClickSeries event assigned. This is because the OnClickSeries event is fired instead of the zoom.
Using something like this may help:
This is as designed. This happens with all series styles if you try to make zoom by clicking on the series and having the OnClickSeries event assigned. This is because the OnClickSeries event is fired instead of the zoom.
Using something like this may help:
Code: Select all
void __fastcall TForm1::Chart1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
if (Series1->Clicked(X,Y)!=-1) Chart1->AllowZoom=false;
else Chart1->AllowZoom=true;
}
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 |
I still wonder why this is as designed. It does make sense for 2D series or any sereis doesn't cover most of the area.
For surface or color grid, the sereis is everywhere; zoom and clickseries should be designed as different thing, don't you think.
Because of this issue, OnClickSeries is almost useless if I want zoom any where. I have to put the implementation on the OnClick event. Not a big deal. but it'll be great these two can be seperated.
Thanks.
Fang
For surface or color grid, the sereis is everywhere; zoom and clickseries should be designed as different thing, don't you think.
Because of this issue, OnClickSeries is almost useless if I want zoom any where. I have to put the implementation on the OnClick event. Not a big deal. but it'll be great these two can be seperated.
Thanks.
Fang
Hi Fang,
yes, I understand what you say, but as you know, as this can be good for you and others it could affect a lot of customers bcos this has been designed as is from the beginning, so it could be dangerous to change it. However I think most of these situations can be solved by using the OnMouseDown, move or up events.
yes, I understand what you say, but as you know, as this can be good for you and others it could affect a lot of customers bcos this has been designed as is from the beginning, so it could be dangerous to change it. However I think most of these situations can be solved by using the OnMouseDown, move or up events.
Pep Jorge
http://support.steema.com
http://support.steema.com