Skip to content

Instantly share code, notes, and snippets.

@fnneves
Last active May 31, 2022 01:24
Show Gist options
  • Save fnneves/5ee357a735888f4ec68021b7d63f54e8 to your computer and use it in GitHub Desktop.
Save fnneves/5ee357a735888f4ec68021b7d63f54e8 to your computer and use it in GitHub Desktop.
fig_pricehist = px.line(dict_price['O'],
y='Close',
title='2Y Price History')
fig_pricehist.update_layout(template=THEME, margin = dict(t=50, b=30, l=25, r=25))
fig_pricehist.update_traces(line_color='royalblue', line_width=3, hovertemplate='Close @ %{x}: $%{y}')
fig_pricehist.show()
##################
fig_rev = px.bar(dict_income['AMZN']['Revenue'],
y='Revenue',
text_auto='.3s',
hover_data = {'Revenue': ':,.2d'})
fig_rev.update_xaxes(type='category')
fig_rev.update_traces(textfont_size=12, textangle=0, textposition="outside", cliponaxis=False)
fig_rev.update_layout(template=THEME, margin = MARGIN)
fig_rev.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment