Made progress on the xaxis bug, need to fix legend