✊🏿 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']),
                       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']),
                       label='Workplaces', values=zdf['gm_Workplaces']),
                       label='Residential', values=zdf['gm_Residential']),
                       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)',
                  ), dimensions=dimensions))

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.