Page 1 of 2
OnClickSeries is not triggered for 3D charts
Posted: Sun Dec 18, 2022 2:51 am
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Mon Dec 19, 2022 11:21 am
by yeray
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.
Re: OnClickSeries is not triggered for 3D charts
Posted: Mon Dec 26, 2022 6:44 pm
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Tue Dec 27, 2022 7:36 am
by Pep
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Tue Dec 27, 2022 1:09 pm
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Tue Dec 27, 2022 3:17 pm
by Pep
Hello Patricio,
could you upload to any host or place where I can download throught it ?
Re: OnClickSeries is not triggered for 3D charts
Posted: Tue Dec 27, 2022 4:10 pm
by 16892633
Sure, here is the link with the project and an image.
https://drive.google.com/drive/folders/ ... sp=sharing
Best regards,
Patricio Cerda
Re: OnClickSeries is not triggered for 3D charts
Posted: Wed Dec 28, 2022 11:43 am
by Pep
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,
Re: OnClickSeries is not triggered for 3D charts
Posted: Thu Dec 29, 2022 12:05 am
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Fri Dec 30, 2022 7:06 am
by Pep
Hello Patricio,
for C++ should be :
Code: Select all
DBChart_FlujoCajaFlujoCaja->setCancelMouse(true);
Does it work for you?
Re: OnClickSeries is not triggered for 3D charts
Posted: Fri Dec 30, 2022 10:40 pm
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Wed Jan 11, 2023 8:40 am
by yeray
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.
Re: OnClickSeries is not triggered for 3D charts
Posted: Wed Jan 18, 2023 8:27 pm
by 16892633
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
Re: OnClickSeries is not triggered for 3D charts
Posted: Wed Jan 18, 2023 10:27 pm
by yeray
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:
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);
}
Re: OnClickSeries is not triggered for 3D charts
Posted: Thu Jan 19, 2023 2:26 pm
by 16892633
Ok, now I did generated the correct .tee file.
Thanks Yeray.
I will be waiting for your comments.
Best regards,
Patricio Cerda