3

我刚开始使用 WebDataRocks,似乎无法获得填充窗口的高度。文档说它会(https://www.webdatarocks.com/doc/init-api-call),“以像素或百分比为单位的数据透视表的高度(默认为 500)”。

下面的代码片段甚至不会呈现。

var pivot = new WebDataRocks({ container: 'wdr-component', height: 100%, beforetoolbarcreated: customizeToolbar, toolbar: true, report: {

任何建议,将不胜感激。

4

1 回答 1

1

要以百分比设置数据透视表的高度,请使用字符串值。例如,

height: '100%'

为了使数据透视表的高度填满窗口,父级的高度必须为 100%。因此,添加以下 CSS:

html {
  height: 100%;
  margin: 0;
}
于 2021-09-07T15:03:27.697 回答