In fact, that's not expected.
By default, both the legend and the bars should use the order present in the data: "avg inventory" followed by "annualized margin".
Could you have specified some option which inverts the legend or bar order? Could you share the log with extra information, in particular, having "?debugLevel = 5 " in the URL?
Cheers