Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 23, 2020 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/67a186af4bc83c510472d4a28b215ffa to your computer and use it in GitHub Desktop.
Save amankharwal/67a186af4bc83c510472d4a28b215ffa to your computer and use it in GitHub Desktop.
fig = go.Figure(data=[go.Table(
columnorder = [1,2,3,4],
columnwidth = [50,70,60,400],
header=dict(values=['<b>AQI</b>', '<b>Remark</b>','<b>Colour Code</b>','<b>Possible Health Effects</b>'],
line_color='darkslategray',
fill_color='skyblue',
align='left'),
cells=dict(values=[['0-50','51-100','101-200','201-300','301-400','401-500'],
['Good','Satisfactory','Moderate','Poor','Very Poor','Severe'],
['','','','','',''],
['Minimal impact','Minor breathing discomfort to sensitive people',\
'Breathing discomfort to the people with lungs, asthma and heart diseases',\
'Breathing discomfort to most people on prolonged exposure',\
'Respiratory illness on prolonged exposure','Affects healthy people and seriously impacts those with existing diseases']],
line_color='darkslategray',
fill_color=['rgb(255,255,255)',
'rgb(255,255,255)',
[color for color in colorscale],
'rgb(255,255,255)'],
align='left'))
])
fig.update_layout(height=180,paper_bgcolor='LightSteelBlue',margin=dict(l=5,r=5,t=5,b=5))
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment