新的ion.RangeSlider带给Shiny有什么优势? [英] What advantages does the new ion.RangeSlider bring to Shiny?

查看:100
本文介绍了新的ion.RangeSlider带给Shiny有什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Shiny 0.11开始,滑块已更改为ion.RangeSlider.

As of Shiny 0.11, the sliders have been changed to ion.RangeSlider.

乍一看,它们看起来非常不同,尤其是对于HTML 5外观:

At first glance, they look very different, especially with the HTML 5 skin:

...但是显然,这些新滑块比旧滑块可以做很多事情?

...but apparently these new sliders can do (a lot?) more than the old sliders.

我想利用新的ion.RangeSlider,尤其是updateSliderInput之类的功能,这些功能对我来说不适用于旧的滑块.

I'd like to take advantage of the new ion.RangeSlider, especially features like updateSliderInput, which wasn't working for me with the old sliders.

但是,我似乎找不到任何有关如何真正利用新滑块所提供功能的文档.

However, I can't seem to find any documentation on how to actually take advantage of what the new slider has to offer.

滑块上的文档看起来与以前的相同在0.11之前.

The documentation on the slider looks the same as it did prior to 0.11.

RStudio说,新的滑块支持从服务器更新更多属性..."

RStudio says the new sliders "support updating more properties from the server..."

我的问题是,所支持的属性到底是什么?

My question is, what exactly are the properties that are supported?

此外,看起来有些皮肤可以更改滑块的外观-使用Shiny时是否可以直接使用这些外观?

Further, it looks like there are some skins that can change the appearance of the slider -- are these skins available out of the box when using Shiny?

例如:

我很想使用这种皮肤-突然之间,旧滑块和新滑块之间的差异并不那么大.

I would love to use this skin -- suddenly the difference between the old slider and new slider is not so drastic.

谢谢.

推荐答案

我认为他们决定改用ion.rangeslider,因为它功能更强大并且支持更多功能,但是正如您注意到的那样,他们没有利用这些功能中的任何一个.

I think they decided to change to ion.rangeslider because it's much more powerful and supports a lot more features, but as you noticed, they haven't taken advantage of any of those features.

所有设置( https://github.com/IonDen/ion.rangeSlider#settings ),可以在JavaScript中进行更改,因此从技术上讲,该滑块已经比以前更强大了,但是您正确地需要更新Shiny函数,以便使用这些设置/功能更加方便.

All the settings (https://github.com/IonDen/ion.rangeSlider#settings) can be changed within JavaScript, so the slider is technically already more powerful than before, but you're right that the Shiny functions need to be updated to make it more convenient to use these settings/features.

在github上有一个针对此问题的公开问题,他们最近在它上添加了闪亮的0.12.2里程碑( https://github.com/rstudio/shiny/issues/866 )

There's an open issue on github for exactly this problem, and they recently added the milestone of shiny 0.12.2 to it (https://github.com/rstudio/shiny/issues/866)

关于皮肤:通过查看文档,它说您需要为其提供的每种皮肤都包含一个特殊的CSS文件

Regarding skins: by looking at the documentation, it says that you need to include a special CSS file for each one of the skins they provide

这篇关于新的ion.RangeSlider带给Shiny有什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆