Breaking lines in a table

Hi all,

i am trying to display a longer text in a table, but unfortunately, it overflows. Is there a possibility to break it into lines?

I am using the code from the sample:

import plotly.plotly as py
from plotly.tools import FigureFactory as FF 

data_matrix = [['Country', 'Year', 'Population'],
['Some reaaallyy loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text', 2015, 15]
]

table = FF.create_table(data_matrix)
py.iplot(table, filename='simple_table')

Thank you for help,
Adam

1 Like

Hi there,
To break up your line you’ll have to add an html break: < br >
similar to this example: https://plot.ly/python/table/#tables-with-graphs

1 Like

Thank you very much Chelsea! It solved the problem. Although, i find it quite complicated to break the lines like this. Would be great if plotly could natively do this.