新的 ion.RangeSlider 给 Shiny 带来了哪些优势? [英] What advantages does the new ion.RangeSlider bring to Shiny?

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

问题描述

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

乍一看,它们看起来非常不同,尤其是 HTML 5 皮肤:

...但显然这些新滑块比旧滑块可以做(很多?)更多.

我想利用新的 ion.RangeSlider,尤其是像 updateSliderInput 这样的功能,它不适用于旧滑块.

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

) 可以在 JavaScript 中更改,因此从技术上讲,滑块已经比以前更强大了,但您是对的,需要更新 Shiny 功能以更方便地使用这些设置/功能.

github 上有一个针对这个问题的未解决问题,他们最近在其中添加了闪亮 0.12.2 的里程碑(https://github.com/rstudio/shiny/issues/866)

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

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.

解决方案

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

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

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