I have a chart with multiple scales. If I turn the visiblity off for some of the scales and then turn them back on they are not in the correct order on the chart. I have attached a program that I used to recreate the problem.
The only solution I can think of is to make all the scales invisible then make them visible in the order you want. I have modified your code to do this and added code to speed up the processing by disabling the front panel updates.