Using customdata + hovertemplate is explained here. Whatever you pass in labels will be displayed on the plot.