How to set the column_width for table while using rails prawn?
This is my prawn code
table1 = [["Time duration selected", "Driving Time", "Stop Time", "Productivity", "Stop Count", "Max Speed (km/h)", "Average Speed (km/h)", "Distance Travelled (km)"]]
tab开发者_运维知识库le(table1)
This code creates a row.. But i need to specify column width here... so how to set the column width?
Two ways width can be mentioned.
First, table tablename,:column_widths => {0 => 70,1 => 60,2 => 60,3 => 60,4 => 60,5 => 70,6 => 70,7 => 70}
This table contains 8 columns.
Secondly, you set the width of the whole table table tablename,:width => 350
精彩评论