Fixed legend items extraction to include amount_type