Not sure but it could be that when the axis of a series is turned off that series goes off as well and might no longer be included in the listbox...
No, this works fine. I have Lazarus 4.4, and the listbox does what it shall do finally. btw I found an easy trick to avoid to delete and readding the chartlistbox in times of troubles: Just cut the property in the chart. Set it to none. Then add the property again and the listbox is actual without troubles. However the Listbox is not the problem, works fine (at least at the moment).
If there is only one "Proz" axis, I'd just iterate over all series now and count how many series assigned to this axis are active. When the counter is zero, the axis can be hidden, otherwise must be shown.
There is only one PROZ ax. It scales the percentage values.
I will think about this tomorrow, because I am too tired today: I wonder, if it is a good idea, to set the ax to invisible in the top of my function. In many cases there will be a percentage-series active. May be this is the problem, that I re-set it to visible after having set to invisible before. There is an ax-vakuum between the lines.
Are you sure, you can turn off an axes that easy? Try to turn off the last one at the left side. Not sure, if you will see the same effect, I saw.
So let us write on here, if one of us has a new idea.
Thank you to care for this complex component!!