Black Lives Matter. Please consider donating to Black Girls Code today.

Label associated with RadioItems default value is not reflected on pageload

Hi! I’ve set up a RadioItems dashboard component with a particular default value. This default value is appropriately passed to the Graph components on pageload, but it’s not reflected in the radio buttons themselves (eg. all buttons appear ‘unselected’). I’m not sure if this is a bug, since any given value doesn’t necessarily correspond to a particular label. But I’m also not sure how to rectify the situation.

In my specific example, the None label would appear selected on pageload.

Here’s the code I’m working with.

            dcc.RadioItems(
              id='marker-symbol-picker',
              options=[
                {'label': 'None', 'value':
                  marker_stylings['default']
                },
                {'label': 'Success/Failure', 'value':
                  marker_stylings['success-fail']
                },
                {'label': 'All Outcomes', 'value':
                  marker_stylings['all-outcomes']
                }
                ],
            value=marker_stylings['default']
            )

The reference dictionary values are lists of dictionaries, like so:

    [
      {
        'filter_key': 'auction_success_categorical',
        'filter_value': 0,
        'symbol': 'x',
        'size': 7
      },
      {
        'filter_key': 'auction_success_categorical',
        'filter_value': 1,
        'symbol': 'circle',
        'size': 6
      }
   ]