muccg / rdrf

The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.
GNU Affero General Public License v3.0
15 stars 8 forks source link

Screenshots of slider controls used in CIC/Proms #743

Closed id2359 closed 5 years ago

id2359 commented 5 years ago

Include information ( text) as comment to this ticket detailing exact behaviour of the control.

aminur80 commented 5 years ago

Figure: Initial State initial_health_rating Figure: value selected value_select_01 Figure: value selected value_selected_02 Figure: Step size 0.25 step_size_0 25

API Name: rc-slider Slider UI Component for React Supports IE9, IE9+, Chrome, Firefox & Safari

Some of the key properties:

name type default description
min number 0 the minimum value of the slider
max number 100 the maximum value of the slider
marks object{number: string} or object {number:{ style, label }} {} Mark on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties.
step number or null 1 Value to be added or subtracted on each step the slider makes. Must be greater than zero. max - min should be evenly divisible by the step value. support decimal value
range boolean false Determines the type of slider. If range is true, two handles will be rendered in order to select a range.
vertical boolean false If vertical is true, the slider will be vertical.
value number or [number, number] set current positions of handles. If range isfalse, the type of defaultValue should be number. Otherwise, [number, number]
dot boolean false When the step value is greater than 1, you can set the dots to true if you want to render the slider with dots.
aminur80 commented 5 years ago

Link - https://www.npmjs.com/package/rc-slider

aminur80 commented 5 years ago

rc-slider3.pdf

aminur80 commented 5 years ago

What is achievable: To make the slider look and feel like EQ5D, we can mark the slider with values which is configurable (within the code) and therefore the slider can have marks 0, 10, 20, 30, 40 and so on. Here is a screen shot -

slider_with_marks