update interactive legend example to use afterScript and provide custom x and y axis labels