Skip to Content
DataCards 2.2.4 is released 🎉

Radio Group Card

Card type: radioGroup

Data type of variable: int

Radio group card

The radio group card displays a set of options as radio buttons, allowing users to select a single value. Selecting an option will update the value of the connected DataCards variable.

In addition to the common parameters and the input card parameters, the radioGroup card has the following configuration options:

NameTypeRequiredDescription
optionslistYesList of option dicts in form [{'alias': 'A', 'value': 0}].
unitstrNoText to be displayed at the bottom of the card (only shown in horizontal orientation)
orientationstrNoLayout direction of the radio buttons. Options: 'vertical' (default) or 'horizontal'

Examples

Basic radio group

options = [ {'alias': 'A', 'value': 0}, {'alias': 'B', 'value': 1}, {'alias': 'C', 'value': 2} ] datacards.publish.card( type='radioGroup', orientation='vertical', options=options, label='RadioGroup', unit='Unit', variable_key='my_variable_key', logic_view_size=(2, 2) )
Basic radio group card

Horizontal radio group

datacards.publish.card( type='radioGroup', orientation='horizontal', options=options, label='RadioGroup', unit='Unit', variable_key='my_variable_key', logic_view_size=(2, 1) )
Horizontal radio group card
Last updated on