TODO : modify the legend according to the current items used