It should either be a user-controlled param like the x and y axis or check whether the legend mapping is categorical or numeric