how to hide column in google charts table

前端 未结 5 653
梦如初夏
梦如初夏 2021-02-05 12:18

I\'ve got a Google Charts Table that displays a couple of columns and rows. Say for instance we have 4 columns(A,B,C,D respectively). How would I be able to still load column C\

5条回答
  •  不思量自难忘°
    2021-02-05 12:47

    You can do this with CSS.

    "#table_div" is the div my table is wrapped in. I use this because there a multiple tables on the same page.

    #table_div .google-visualization-table table.google-visualization-table-table 
       td:nth-child(1),th:nth-child(1){
       display:none;
    }
    

    I also have an event handler on the chart's rows, and can still pick up the data from the hidden column.

提交回复
热议问题