What do you expect with this code:
If 100%Y > 100%x Then ' portrait mode
#SupportedOrientations: Portrait
Else
#SupportedOrientations: Landscape
End If
He wants to have both orientations available.
In landscape mode no special action.
In portrait mode, the chart views' height is bigger than its width.
But, to draw the chart, its width must be bigger than its height.
And then it is rotated by 90°.
I need to memorize the original width and height because the rotation doesn't change those.