"NumericRange" (Question Interface Type)
"NumericRange" (Question Interface Type)
"NumericRange"
provides a slider where one number can be selected.
Properties
- In QuestionInterface["NumericRange",props], props is an Association that supports the following keys:
-
"Prompt" None text asking the user a question "Range" required the provided range - Additionally, options for Slider are supported including:
-
Appearance Automatic the overall appearance of the slider AutoAction False whether to move the slider automatically when the mouse is over it ImageSize Automatic the overall image size of the displayed slider
Corresponding AssessmentFunction
- "NumericRange" is not an automatically assigned interface type for an AssessmentFunction. It must be specified in QuestionInterface.
Examples
open all close allBasic Examples (2)
QuestionObject[QuestionInterface["NumericRange", <|"Prompt" -> "Give a rating:", "Range" -> {1, 10}|>]]A numeric range interface with assessment:
QuestionObject[QuestionInterface["NumericRange", <|"Prompt" -> "How many ounces in a cup?", "Range" -> {1, 10, 0.5}|>], AssessmentFunction[8.0 -> 3]]QuestionObject[QuestionInterface["NumericRange", <|"Prompt" -> "How many ounces in a cup?", "Range" -> {{1, 10, 0.5}}|>], AssessmentFunction[8.0 -> 3]]Generalizations & Extensions (1)
Create an assessment and customize the appearance and behavior of the slider:
QuestionObject[QuestionInterface["NumericRange", <|"Prompt" -> "How tall is a giraffe (in meters)?", "Range" -> {1, 10, 0.1}, Appearance -> "UpArrow", AutoAction -> True, ImageMargins -> 40, ImageSize -> 100|>], AssessmentFunction[Automatic, IntervalMemberQ[Entity["TaxonomicSpecies", "Species:GiraffaCamelopardalis"]["Height"], Quantity[#, "Meters"]]&], ImageSize -> All]