Page 1 of 2
Show/Hide Series checkboxes too big
Posted: Sat Jun 04, 2022 1:43 pm
by 16589841
Hello, we recently updated TChart sources from V2021.33 to V2022.35
and we are using Delphi 10.4, compiling for Win 64Bit.
There we noticed that suddenly all the checkboxes to show/hide series
are far too big, as soon as the Display Scaling is bigger than 100%.
The attached screenshot is for a Scaling of 150%:
- 150PerccentScalingCapture.PNG (334.4 KiB) Viewed 22665 times
- CheckBoxesTooBigCapture.PNG (129.38 KiB) Viewed 22665 times
Partially (for other charts) the Checkboxes get bigger than the whole chart.
Is there a fix available for this bug?
Re: Show/Hide Series checkboxes too big
Posted: Thu Jun 16, 2022 6:52 am
by 16589841
Hello TChart Team,
This is really an annoying bug, with higher display scaling the Checkboxs and with that the legend tends to vanish completely.
Can you reproduce this problem at least, or can I help with that?
Something concerning Checkboxes seems to have changed in the recent release(s) but obviously, this change introduced a buggy behavior. At least with the Delphi version we are using. The current release of TChart is not usable for us.
Re: Show/Hide Series checkboxes too big
Posted: Tue Jun 28, 2022 2:49 pm
by 16592406
Hi, i had the same problem.
In my situation i've changed 'scale' property in TeeGDIPlus component connected to Chart to 2, then back to value 1 and checkboxes are scaled properly. Don't ask my why and how this resolve the problem. Maybe i also recompiled my project after scale changed to 2 and second time after back to 1.
Re: Show/Hide Series checkboxes too big
Posted: Tue Jun 28, 2022 3:42 pm
by yeray
Thanks for reporting it.
We are investigating what happened and we'll be back here asap.
Re: Show/Hide Series checkboxes too big
Posted: Mon Jul 04, 2022 7:52 pm
by 16589841
Hello Lukasz, thank you for your tip, but we have many Charts in our Sofware. Going through all these Charts and changing the Scale property of all TeeGDIPlus components, doesn't seem to be a viable/real solution.
I wonder if we could simply replace the current scaling again with the working scaling, from the older TChart code?
Re: Show/Hide Series checkboxes too big
Posted: Tue Jul 05, 2022 7:45 am
by yeray
Hello,
I have two monitors, one at 100% and the other at 175%. I'm running the following test application:
Starting the application at the 100% monitor and dragging it to the 175% monitor everything seems to be correctly resized:
- HighDPI_RAD10_4_Swp08enjS3.png (45.73 KiB) Viewed 22333 times
Starting the application at the 175% monitor, fonts and checkboxes are a bit smaller than the standard components:
- HighDPI_RAD10_4_sd25NTvn2M.png (48.4 KiB) Viewed 22333 times
Could you please check how that test application works for you and modify it to reproduce the problem here if necessary?
Re: Show/Hide Series checkboxes too big
Posted: Tue Jul 05, 2022 1:12 pm
by 16589841
Hello Yeray,
I modified the example, when you press the "Create Chart and data" button (multiple times), just the Checkboxes keep growing. Everything else keeps roughly the correct size.
- tChartWrongScalingCapture.PNG (170.91 KiB) Viewed 22327 times
- tChartWrongScaling2Capture.PNG (216.71 KiB) Viewed 22327 times
I also attached the modified project.
Thanks and best regards,
Thomas
Re: Show/Hide Series checkboxes too big
Posted: Mon Jul 11, 2022 11:22 am
by yeray
Hello,
Since you own the sources, I've sent a fix proposal to the mail account you have registered in these forums.
Extract the contents of the zip in your sources folder (backup it first) and rebuild TeeChart packages with TeeRecompile.
Please, tell us how it works at your side.
Re: Show/Hide Series checkboxes too big
Posted: Mon Jul 11, 2022 1:32 pm
by 16589841
Hello Yeray,
Great, I can confirm that your changes fixed this nasty bug, congrats !
Are these changes final?
I can see that certain properties are no more available, like "VCLTee.TeCanvas.TeeCheckBoxSize"
or "VCLTee.TeCanvas.TeeDrawCheckBox"
Best regards,
Thomas
Re: Show/Hide Series checkboxes too big
Posted: Mon Jul 11, 2022 2:39 pm
by yeray
Hello Thomas,
Thanks for confirming the proposal works for you.
The changes are one merge ahead of being final, pending for a revision.
If you have any doubt or worry, don't hesitate to let us know.
I'll check if TeeCheckBoxSize
and TeeDrawCheckBox
still make sense.
Re: Show/Hide Series checkboxes too big
Posted: Tue Jul 26, 2022 11:02 am
by yeray
Hello,
Yeray wrote: ↑Mon Jul 11, 2022 2:39 pm
I'll check if
TeeCheckBoxSize
and
TeeDrawCheckBox
still make sense.
In this merge request,
TeeCheckBoxSize
variable is substituted for a
TeeDefaultCheckBoxSize
const and a
TChart
's
Aspect.CheckBoxZoom
property which are used to calculate the final checkbox size like this:
Code: Select all
function TTeeCanvas.GetCheckBoxSize:Integer;
begin
Result:=TeeDefaultCheckBoxSize;
if (CheckBoxZoom<>100) then
Result:=Round({$IFDEF FMX}Max(1,TeeDefaultCheckBoxSize*CheckBoxZoom*0.01){$ELSE}TeeDefaultCheckBoxSize*CheckBoxZoom*0.01{$ENDIF});
end;
This is the same way we already do for text sizes (and also for pen widths in this branch).
And regarding
TeeDrawCheckBox
method, we only added an extra parameter to it (
CheckBoxSize:Integer=TeeDefaultCheckBoxSize
) so the method should still be accessible. Isn't it accessible for you?
Re: Show/Hide Series checkboxes too big
Posted: Fri Jul 29, 2022 10:47 pm
by 16589841
Hello Yeray,
Thanks for the info, I will have a look at this when I am back in the Office, in about two weeks.
Best regards,
Thomas
Re: Show/Hide Series checkboxes too big
Posted: Wed Dec 21, 2022 1:05 pm
by 16594642
Hello,
We still have more or lesss the same issue as in the original post. We have recently upgraded an older Win64-project from Delphi 10.2 to 11.2 and TChart from 2017.22 to 2022.36. I also had TChart 2022.34 installed but after seeing the growing boxes and finding this thread, I upgraded to the most recent version. Unfortunately, this did not help to fix the issue.
I see this discussion is from July and the current TChart 2022.36 is from late September. Did the fix make it into the current version? If not, could you provide the fix proposal to me?
Many thanks in advance!
Re: Show/Hide Series checkboxes too big
Posted: Tue Dec 27, 2022 7:29 am
by Pep
Hello Kai,
the person who took care about this item is on vacation time until 9th Jan, and I'm not sure if you a specific code is needed in order to fix it.
Please, let me advise him so he can send it to you as soon as he back.
Best regards
Re: Show/Hide Series checkboxes too big
Posted: Mon Jan 09, 2023 4:02 pm
by yeray
Hello,
Kai wrote: ↑Wed Dec 21, 2022 1:05 pm
I see this discussion is from July and the current TChart 2022.36 is from late September. Did the fix make it into the current version? If not, could you provide the fix proposal to me?
Indeed the change should be in v2022.36.
I'll give it a try at the examples in this thread and let you know.