最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tabulator - How to align data in Tabulatorjs spreadsheet mode? - Stack Overflow

programmeradmin1浏览0评论

I'm using spreadsheet feature from tabulator.js. I'd like to align data as in real spreadsheet (numbers to the right, text and dates to the left). Is there any way to do it with that library? My code is below.

var table = new Tabulator("#example-table", {
  spreadsheet:true,
  rowHeader:{field:"_id", hozAlign:"center", headerSort:false},
  spreadsheetData: [
    [' ', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
    ['08:00', 9937, 2123,   2321,   7749,   9816,   4355,   8279],
    ['09:00', 2380, 2345,   6977,   8896,   4012,   3803,   5408],
    ['10:00', 9180, 9021,   3912,   9445,   3917,   1200,   1837],
    ['11:00', 1924, 8734,   1819,   1838,   2330,   7921,   9219],
    ['12:00', 5434, 8665,   5875,   9732,   1926,   9999,   9743],
  ]
});
发布评论

评论列表(0)

  1. 暂无评论