Hi partner,
The code that determines the position of the legend is not Docking="Bottom" or "Top", but Position="5, 90, 20, 10".
The Position="5, 90, 20, 10" translates as follows, the first number is the distance from the left across the chart in % (0 would be absolute left, 100 absolute right). The second number is the distance from the top in % (so 100 would be at the bottom - I find setting to 100 though makes the legend disappear).
So if you want to move the legend to the top, then you need to reduce the second number.
You can write like this: Position="5, 5, 20, 10"