Is it possible using Plotly Dash to create line graphs in which the line colors are gradient (purely for aesthetics)?
I tried using something like:
'line': {'color': 'linear-gradient(90deg, red, red 60%, white)' }
Example of entire graph code in plotly dash:
dcc.Graph(
id='MORTGAGE_RATES',
figure={
'data': [
{ "x": MORTGAGE30US['date'],"y": MORTGAGE30US['value'],"mode": "lines","name": '30 YR', 'line': {'color': 'linear-gradient(90deg, red, red 60%, white)' }},
{ "x": MORTGAGE15US['date'],"y": MORTGAGE15US['value'],"mode": "lines","name": '15 YR',},
],
'layout': {
'title': 'MORTGAGE RATES',
"paper_bgcolor": "rgb(46, 54, 65)",
"plot_bgcolor": "rgb(46, 54, 65)",
'font': {
'color': "rgb(255,255,255)"
}
}
}
)