FMX TChartListBox not showing Series on OSX, Android, or IOS

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
Rick
Newbie
Newbie
Posts: 2
Joined: Mon Jun 08, 2020 12:00 am

FMX TChartListBox not showing Series on OSX, Android, or IOS

Post by Rick » Wed Oct 05, 2022 4:04 pm

As mentioned before in the forum post "FMX TChartlistBox not working", TChartListBox is not still not displaying the Series on the OSX, Android and IOS platforms. I have downloaded and tested the latest release (36), and the problem is still there.

Below are screen shots of the same program running on a Win_32 platform and a Mac Mini. The Android and IOS platforms have the same problem as the OSX platform. You can see the series being displayed on the Win32 version, but not on the OSX version. In addition, it appears the Series can be selected on the OSX platform (third series selected in image), but nothing is displayed for those series. So it appears the items are being created in the list box, but is failing to paint them.

Win_32
Windows_32_bit.png
Windows_32_bit.png (42.24 KiB) Viewed 13454 times
Mac Mini - third series selected
Mac Mini.png
Mac Mini.png (100.96 KiB) Viewed 13454 times
I also attached a zip file with the project I used to create the images above.

Rick Hollerich
Attachments
FMX.zip
(1.57 KiB) Downloaded 471 times

Rick Hollerich
Newbie
Newbie
Posts: 5
Joined: Mon Jun 27, 2022 12:00 am

Re: FMX TChartListBox not showing Series on OSX, Android, or IOS

Post by Rick Hollerich » Wed Oct 12, 2022 9:01 pm

Please note, I had the wrong file attached to the first submit of this post. The correct one is now attached.

The problem with ChartListBox Series ListBoxItems on Android, IOS and OSX appears to be with the "FMXTee.Chart.ListBox.Style.res" file that comes with the source code.

I recreated the "chartlistbox" style in a Stylebook, commented out the line "{$R FMXTee.Chart.ListBox.Style.res}", made a few more changes (bug fixes?) in the "FMXTee.Chart.ListBox.pas" file, then recompiled the code. I now get the list items to appear correctly in the Android, IOS and OSX devices. Unfortunately, this is not a good work around for the component.

I attached a zip file that contains the project file I tested with, along with my modified "FMXTee.Chart.ListBox.pas" file. I added some notes to the file at the three places I make changes to make all this work.

Note: in the attached project, I used the "Default" style in the Stylebook to recreate the "chartlistbox" style. However, using just the "Default" style did leave gray color boxes on the IOS devices for some reason. To get the colors to show correctly for IOS devices in my test program, I had to add a button to my test project (not included in zip) and toggle the "ShowSeriesColor" property off then back on. This would hide the gray boxes, then re-display them with the correct coloring. This toggling had to be done after the form was fully displayed, as trying to do that in FormShow or FormActivate did not work for some unknown reason. Setting the TChartListBox ShowSeriesColor to false at design time, then setting it to true in FormShow/Activate also did not work. The gray color boxes still showed until I pressed the button to toggle ShowSeriesColor.

Also, because I already had a Stylebook in my main project with different styles for the different platforms, using the "Default" style for the "chartlistbox" style did not work, as this again left the Series listboxitems on Android, IOS and OSX devices blank. I had to recreate the "chartlistbox" style for each of the platform Styles I was using in the StyleBook. The bonus to creating separate styles for each of the platforms was that the IOS now worked. Not sure why the IOS worked this way in my main program, as I think I tried separate Styles for each platform in the test program without success for the IOS devices. But I may not have had all the changes in "FMXTee.Chart.ListBox.pas" at that time.

FYI: I did try to recreate the original "FMXTee.Chart.ListBox.Style.res" file, but either I was doing something wrong, or not all the files are included to rebuild the resource file, as I kept getting compiler errors when I tried.

Rick Hollerich
Attachments
FMXTee.Chart.ListBox Fix.zip
(6.71 KiB) Downloaded 464 times

Rick Hollerich
Newbie
Newbie
Posts: 5
Joined: Mon Jun 27, 2022 12:00 am

Re: FMX TChartListBox not showing Series on OSX, Android, or IOS

Post by Rick Hollerich » Wed Oct 12, 2022 9:15 pm

Forgot to add, I did rearrange the "chartlistbox" style slightly. I moved the "color" rectangle to the right side of the style. I did this because it was too easy to hit the color box when trying to hit the checkbox on the smaller android and IOS devices.

Post Reply