Google Charts API:重新启用列标题包装?

And*_*dré 1 google-visualization

已发布新的Google Charts API(https://developers.google.com/chart/interactive/docs/release_notes#april-30-2015),该API 禁用表格图表的列标题换行.我该如何重新启用它?

Whi*_*Hat 5

分配一个css类名headerCell,它甚至可以是空白的.这将导致文本换行...

将其添加到表格图表选项中......

  cssClassNames: {headerCell: 'googleHeaderCell'}
Run Code Online (Sandbox Code Playgroud)

在页面的某处添加此css ...

  .googleHeaderCell {}
Run Code Online (Sandbox Code Playgroud)

  • 干杯! [配置选项](https://developers.google.com/chart/interactive/docs/gallery/table#configuration-options) 引用了`cssClassNames`,但没有提到包装。我只知道是因为我经常使用表格图表并尝试了多种样式。标题行有一些问题,当标题_do_ wrap 时,中心对齐有时看起来很有趣,左或右效果最好。 (2认同)