Page 1 of 1

Unable to OnClickSeries

Posted: Mon Jun 07, 2010 9:37 pm
by 10550242
Hi - I have obviously messed something up.

I have a Pie Chart that I have been using for years - and now I cannot Click on a piece of the Pie. I have an OnClickSeries event - but nothing happens when I click on the pie. I also have an even for OnClickBackground - but it works fine.

Any thoughts as to where I can start looking to see what setting I have messed up to have it behave this way?
BTW - when I click and Drag on the Pie - it allows me to separate that slice of the pie from the other parts of the pie.


Bradley MacDonald

Re: Unable to OnClickSeries

Posted: Tue Jun 08, 2010 10:02 am
by yeray
Hi Bradley,

It seems it has been broken with the v2010. I've added it to the defect list to be fixed asap (TV52014944).
In the meanwhile, as a workaround, this seems to work fine:

Code: Select all

var MouseDownX, MouseDownY: Integer;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.FillSampleValues();
end;

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  MouseDownX:=X;
  MouseDownY:=Y;
end;

procedure TForm1.Chart1Click(Sender: TObject);
begin
  if (Series1.Clicked(MouseDownX,MouseDownY) > -1) then
    ShowMessage('Series ChartClick');
end;

Re: Unable to OnClickSeries

Posted: Tue Jun 08, 2010 1:06 pm
by 10550242
Do you have an estimate when the patch for 2010 will be made available? I am not looking for an exact date - but a general idea. That way I can plan the release of our software around that.

Thank you..

Re: Unable to OnClickSeries

Posted: Tue Jun 08, 2010 1:19 pm
by yeray
Hi Bradley,

I'm afraid I can't. I've added it to the list with an elevated priority but the time until we can fix it always depends on other variables such as the complexity of the problem, the study of the possible collateral damages, the number of issues with even higher priority that claims our team attention,...

I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.

Re: Unable to OnClickSeries

Posted: Wed Jun 09, 2010 8:23 am
by narcis
Hi Bradley,

I have found that the problem is in TeeComma.pas, at TCustomTeeCommander.TeeEvent method. Removing the if statement below solves the issue. I still have to find which was the reason of this statement being included but you can try using this in the meantime.

Code: Select all

    //if not Sender.CancelMouse then
       Sender.CancelMouse:=not DoPanelMouse;
I'll get back to you if I have further news.

Re: Unable to OnClickSeries

Posted: Fri Jun 11, 2010 7:51 am
by narcis
Hello Bradley,

As an update, we found the reason for this change in the sources. This was for compatibility with TeeMaker and only occurs when there's a TTeeCommander in the form. That's because TTeeCommander automatically does pie exploding and therefore click events aren't fired. To avoid this you just need to set EnablePieExploding property to false, for example:

Code: Select all

  TeeCommander1.EnablePieExploding := False;

Re: Unable to OnClickSeries

Posted: Fri Jun 11, 2010 2:36 pm
by 10550242
Thank you for the update and the explaination!