1

Im having problems trying to render tooltips in multiple lines in mpld3.

I tried to use \n and <br> to force a line jump between elements. 

but <br> gets printed directly and \n just ignored in the output.

Anyone can give me a small example on how to do this.

For each label I'm creating a text with this format:

text = ('SEX: ' + str(ALL_CNMI['SEX'].loc[index]) + '\n' + 'AGE: ' + str(ALL_CNMI['AGE'].loc[index]))

labels.append(text)

I would just want to create a tooltip that looks like

Sex: Female
Age: 45

but with this code the tooltips render like:

Sex:Female,Age:45

Thank you so much for your help.

agon
  • 313
  • 3
  • 6

0 Answers0