add ordering + tooltip on amds legend