What advantages does the new ion.RangeSlider bring to Shiny?

旧巷老猫 提交于 2019-12-07 05:54:17

问题


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

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.

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.

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

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

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

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?

For example:

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

Thanks.


回答1:


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.

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.

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)

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



来源:https://stackoverflow.com/questions/31299254/what-advantages-does-the-new-ion-rangeslider-bring-to-shiny

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!