Applying CSS to Google Visualization Table

后端 未结 4 1619
别那么骄傲
别那么骄傲 2021-01-15 19:52

I have created a table in Google Visualization which uses the following code:


  
      

        
4条回答
  •  春和景丽
    2021-01-15 20:46

    Once you create the CSS, I found this to be the key to getting it to work:

    var cssClasses = {headerRow: 'tblHeaderClass',hoverTableRow: 'tblHighlightClass'};
    var options = {showRowNumber: false, allowHTML: true, 'cssClassNames':cssClasses};
    
    table.draw(data,options);

    force the directive cssClassNames to string with "ticks" and be sure to use the object you declared to define whe CSS classes to use for the table element names exposed.

提交回复
热议问题