R垂直滚动不起作用

编程入门 行业动态 更新时间:2024-10-28 14:29:43
本文介绍了R垂直滚动不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试获取垂直滚动条,但这不起作用,有人可以解释为什么吗?我还想默认一次显示20行.

I am trying to get a vertical scroll but this isn't working, can anybody explain why? I would also like to default to show 20 rows at once.

谢谢

title: "Untitled" output: flexdashboard::flex_dashboard: orientation: columns vertical_layout: fill --- ```{r setup, include=FALSE} library(flexdashboard) library(DT) ``` Column {data-width=650} ----------------------------------------------------------------------- ### Chart A ```{r} datatable(cars ,options = list(c(bPaginate = F, scrollY=T)), filter = 'top') ```

推荐答案

scrollY 参数不是布尔值.您需要根据数据表文档将表的固定高度指定为 .

The scrollY parameter isn't a boolean. You need to specify the fixed height of your table as per the datatables documentation.

--- title: "Untitled" output: flexdashboard::flex_dashboard: orientation: columns vertical_layout: fill --- ```{r setup, include=FALSE} library(flexdashboard) library(DT) ``` Column {data-width=650} ----------------------------------------------------------------------- ### Chart A ```{r} DT::datatable(cars, filter = "top", options = list(pageLength = 20, scrollY = "200px")) ```

更多推荐

R垂直滚动不起作用

本文发布于:2023-11-03 01:02:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553859.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!