Lines Not Displaying on Graph

I’m trying to create a list of lines to add to my graph. I define them as follows:

line = {
        'type': 'line',
        'xref': 'x',
        'yref': 'y',
        'x0': row['MD'],
        'y0': 1,
        'x1': row['MD'],
        'y1': 0.5,
        'line': {
            'color': 'rgb(235, 9, 9)',
            'width': 3,
            'dash': 'solid'
        },
        'visible': True,
        'layer': 'above',
    },

For the life of me though, I can’t get them to display on my graphs. I’ve even tried adding a single line, and I can never get it to display.