how to auto fit the row height

how to auto fit the row height

Joe_ChenJoe_Chen Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):

source_table = ColumnDataSource(data=dict(workordernumber=df_summary['workordernumber'],
                                          state=df_summary['state'],
                                          startdate=df_summary['dateactualstart'].dt.strftime('%Y-%m-%d'),
                                          equipmentname=df_summary['equipmentname'],
                                          templatenumber=df_summary['worktemplatenumber'],
                                          name=df_summary['name'],
                                          stepnumber=df_summary['stepnumber'],
                                          reasoncode=df_summary['reasoncode'],
                                          steptitle=df_summary['steptitle']))

columns = [TableColumn(field='workordernumber', title='Work Order Number', width=120),
           TableColumn(field='state', title='Status', width=100),
           TableColumn(field='startdate', title='Date of Start', width=100),
           TableColumn(field='equipmentname', title='Equipment Name', width=100),
           TableColumn(field='templatenumber', title='Template Number', width=100),
           TableColumn(field='name', title='Checklist Name', width=300),
           TableColumn(field='stepnumber', title='Step Number', width=50,
                       formatter=HTMLTemplateFormatter(template='<p><%= value %></p>')),
           TableColumn(field='reasoncode', title='Reason Code', width=100,
                       formatter=HTMLTemplateFormatter(template='<p><%= value %></p>')),
           TableColumn(field='steptitle', title='Step Title', width=200,
                       formatter=HTMLTemplateFormatter(template='<p><%= value %></p>'))]


 table_cl = DataTable(source=source_table, columns=columns, width=1500, height=500, fit_columns=True, row_height=90)

Error messages shown:
Description of problem:
if I set row_height =90, the table show as below.

if I set row_height=180, the table show as below.

But it still can't show all the list items in the column "Step Number" , " Reason Code", " Step Title".

Is there a way to make it auto fit for the row_height?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.