OnClickSeries is not triggered for 3D charts

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Sun Dec 18, 2022 2:51 am

Hi,

I'm having troubles with OnClickSeries of TDBChart v2022.36, for FMX in C++Builder. It is not triggered when the chart is 3D.
Is it a bug or is still a functionallity not available?

My project uses a TDBChart with six Bar series and two Area series. It seems that when I added the Area series then the OnClickSeries event starting failing, but now I can't make it work at all.

Is there an alternative way to do it works with 3D charts?

Best regards,
Patricio Cerda

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Yeray » Mon Dec 19, 2022 11:21 am

Hello Patricio,

A simple example seems to be working fine for me but that may depend on the 3D settings in your chart.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Mon Dec 26, 2022 6:44 pm

Hello Yeray,

Sorry by the delay, I was complicated with other matters.

I have prepared a snipped C++ Builder project where you could see the problem with 3D charts, but unfortunately I can't attache it because their size is 2.7 Mb and is rejected. I want to attach a screenshot of 0,8 Mb but is also rejected.

How can I send to you the project and image?

Best regards,
Patricio Cerda

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Pep » Tue Dec 27, 2022 7:36 am

Hello Patricio,

have you removed all the compiled files before to zip the project to send? This might help to reduce the size.

Best regards

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Tue Dec 27, 2022 1:09 pm

Hello Pep,

Yes, but the project is FMX and two units are forms (fMain.fmx and fGraficosFlujoCaja.fmx) and have 3,9 Mbyte each one.
This is a very reduce snipped project that have 2.7 Mbyte in compressed format (RAR) derived from the original that is much bigger with 438 Mbyte.

Best regards,
Patricio Cerda

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Pep » Tue Dec 27, 2022 3:17 pm

Hello Patricio,
could you upload to any host or place where I can download throught it ?

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Tue Dec 27, 2022 4:10 pm

Sure, here is the link with the project and an image.

https://drive.google.com/drive/folders/ ... sp=sharing

Best regards,
Patricio Cerda

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Pep » Wed Dec 28, 2022 11:43 am

Hello Patricio,

I've checked and all seems to work fine here. Please, review that the "hover" is not activated because it can affiect it.
You can also add this code to check.

Code: Select all

procedure TForm2.FormCreate(Sender: TObject);
begin
  Series1.FillSampleValues();
  Series2.FillSampleValues();
  chart1.Hover.Visible := False;
end;

procedure TForm2.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  showmessage(inttostr(valueindex));
  chart1.CancelMouse := True;
end;
Thanks
Best regards,

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Thu Dec 29, 2022 12:05 am

Unfortunately it does not work for me.

I added the following code for each series:
DBChart_FlujoCajaFlujoCaja->Series[0]->Selected->Hover->Visible = false;

But can't find CancelMouse property. Do you have documentation for C++?

Best regards,
Patricio Cerda

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Pep » Fri Dec 30, 2022 7:06 am

Hello Patricio,

for C++ should be :

Code: Select all

DBChart_FlujoCajaFlujoCaja->setCancelMouse(true);
Does it work for you?

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Fri Dec 30, 2022 10:40 pm

Hello,

No, it does not compile in C++ Builder:

Code: Select all

DBChart_FlujoCajaFlujoCaja->setCancelMouse(true);
This is the error message:
[bcc64 Error] fGraficosFlujoCaja.cpp(324): no member named 'setCancelMouse' in 'Fmxtee::Dbchart::TDBChart'

I did search on a few related .hpp files but couln't find this method.

Just to be clear: I want a solution or workaround to make it work, so I'll appreciate any other suggestion.

Best regards,
Patricio Cerda

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Yeray » Wed Jan 11, 2023 8:40 am

Hello Patricio,

Sorry for the delay here.

I can't test your project because there are dependencies I don't have here.
Since the database has probably nothing to do with the problem you are observing, you could export the chart to a tee file and send it to us so we can try to import it here.

By the way, setCancelMouse(true) doesn't work for me either but CancelMouse=true; does.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Wed Jan 18, 2023 8:27 pm

Hello Yeray,

Sorry too for the delay.

Yes, it does compile and runs but seems not solve the issue:
CancelMouse = true;

I tried to export the DBChart with the following code and obtained the attached .tee file. I hope it is what you asked for, because I couldn't implement the suggested code to export a Chart as on this link: https://www.steema.com/support/viewtopic.php?t=16550

DBChart_FlujoCajaFlujoCaja->SaveToMetafile("C:\\Apps\\teeFile.tee");

Check the .tee file and comment me what you find.

Best regards,
Patricio Cerda
Attachments
teeFile.rar
(27.14 KiB) Downloaded 1764 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnClickSeries is not triggered for 3D charts

Post by Yeray » Wed Jan 18, 2023 10:27 pm

Hello,

That file attached is a .png with a wrong extension.
To export a chart to a .tee file, you should include the "FMXTee.Store.hpp" in the .h:

Code: Select all

#include <FMXTee.Store.hpp>
And run something like this when the chart is drawn (ie with a button):

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  SaveChartToFile(Chart1, "C:\\tmp\\teeFile.tee", true, true);
}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

PCSdeZ
Newbie
Newbie
Posts: 18
Joined: Thu Dec 16, 2021 12:00 am

Re: OnClickSeries is not triggered for 3D charts

Post by PCSdeZ » Thu Jan 19, 2023 2:26 pm

Ok, now I did generated the correct .tee file.
Thanks Yeray.
I will be waiting for your comments.

Best regards,
Patricio Cerda
Attachments
teeFile.rar
(1.07 KiB) Downloaded 1803 times

Post Reply