简体   繁体   English

如何使用Dojo Range Slider设置3个或更多手柄

[英]How to have 3 or more handles with Dojo Range Slider

With Dojo Range Slider there are only two handles (Which basically serves the purpose of specifying a range). 使用Dojo Range Slider时 ,只有两个控柄(基本上用于指定范围)。

It would be better if we have a range slider with more than two handles. 如果我们有一个带有两个以上手柄的范围滑块,那会更好。 In the simplest case it can be assumed that the first handle, second handle, third handle and so on represent some percentage of the whole length of the slider and they together make up 100%, like this 在最简单的情况下,可以假定第一手柄,第二手柄,第三手柄等占滑块整个长度的一定百分比,它们共同构成100%,例如

在此处输入图片说明

So, my question - is there any way to somehow do this with dojo slider, or what needs to change in the rangeSlider.js (dojox.form.RangeSlider.js) or some other file to acheive this ? 所以,我的问题-是否可以通过dojo滑块以某种方式进行此操作,或者需要更改rangeSlider.js(dojox.form.RangeSlider.js)或其他文件来实现此目的?

You can relatively easily build such a widget using the Dojo dgauges framework (dojox/dgauges). 您可以使用Dojo dgauges框架(dojox / dgauges)相对容易地构建这样的小部件。 This allows you among other things to build interactive gauges with several indicator. 这使您可以构建带有多个指示器的交互式仪表。 Each vertical bar in your example would be an indicator. 您示例中的每个竖线都是一个指示器。

See here for doc: http://dojotoolkit.org/reference-guide/1.9/dojox/dgauges.html 参见此处获取文档: http : //dojotoolkit.org/reference-guide/1.9/dojox/dgauges.html

Some examples: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/dgauges/tests/test_BulletGraph.html http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/dgauges/tests/test_Classic_HorizontalLinearGauge.html 一些示例: http : //archive.dojotoolkit.org/nightly/dojotoolkit/dojox/dgauges/tests/test_BulletGraph.html http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/dgauges/tests/tests/test_Classic_Horizo​​ntalLinearGauge.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM