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
Mac Mini - third series selected
I also attached a zip file with the project I used to create the images above.
Rick Hollerich
FMX TChartListBox not showing Series on OSX, Android, or IOS
FMX TChartListBox not showing Series on OSX, Android, or IOS
- Attachments
-
- FMX.zip
- (1.57 KiB) Downloaded 1317 times
-
- Newbie
- Posts: 5
- Joined: Mon Jun 27, 2022 12:00 am
Re: FMX TChartListBox not showing Series on OSX, Android, or IOS
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
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 1316 times
-
- Newbie
- Posts: 5
- Joined: Mon Jun 27, 2022 12:00 am
Re: FMX TChartListBox not showing Series on OSX, Android, or IOS
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.