✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Adding transparency to lines in parallel coordinates

Here is the code to reproduce what I have gotten so far-

import pandas as pd
import plotly.graph_objects as go

zdf = pd.read_csv('https://raw.githubusercontent.com/vyaduvanshi/helper-files/master/parallel_coordinates.csv')
group_vars = zdf['country'].unique()
zdfg = pd.DataFrame({'country':zdf['country'].unique()})
zdfg['dummy'] = zdfg.index
zdf = pd.merge(zdf, zdfg, on = 'country', how='left')


dimensions = list([dict(range=[zdf['gm_Retail & Recreation'].min(),zdf['gm_Retail & Recreation'].max()],
                        label='Retail & Recreation', values=zdf['gm_Retail & Recreation']),
                  dict(range=[zdf['gm_Grocery & Pharmacy'].min(),zdf['gm_Grocery & Pharmacy'].max()],
                       label='Grocery & Pharmacy', values=zdf['gm_Grocery & Pharmacy']),
                  dict(range=[zdf['gm_Parks'].min(),zdf['gm_Parks'].max()],
                       label='Parks', values=zdf['gm_Parks']),
                  dict(range=[zdf['gm_Transit Stations'].min(),zdf['gm_Transit Stations'].max()],
                       label='Transit Stations', values=zdf['gm_Transit Stations']),
                  dict(range=[zdf['gm_Workplaces'].min(),zdf['gm_Workplaces'].max()],
                       label='Workplaces', values=zdf['gm_Workplaces']),
                  dict(range=[zdf['gm_Residential'].min(),zdf['gm_Residential'].max()],
                       label='Residential', values=zdf['gm_Residential']),
                  dict(range=[0,zdf['dummy'].max()],
                       tickvals = zdfg['dummy'], ticktext = zdfg['country'],
                       label='Country', values=zdf['dummy']),
                  
                  ])

fig = go.Figure(data=go.Parcoords(line = dict(color = zdf['dummy'], colorscale=['rgba(99,110,250,0.9)',
'rgba(239,85,59,0.9)',
'rgba(0,204,150,0.9)',
'rgba(171,99,250,0.9)',
'rgba(255,161,90,0.9)',
'rgba(25,211,243,0.9)',
'rgba(255,102,146,0.9)',
'rgba(182,232,128,0.9)',
'rgba(255,151,255,0.9)',
'rgba(254,203,82,0.9)']
                  ), dimensions=dimensions))
fig.show()

This is what it returns-

Now, I have added the alpha factor to every rgba value I passed and yet, I don’t see any transparency in any of the lines. Am I doing something wrong? How can I achieve transparency here?

Edit: Removed one feature from the code as it was obtained from another source and was not reproducible.