Skip to content

Commit

Permalink
Dark style.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbirchard committed Sep 5, 2020
1 parent 694a758 commit faafb61
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions plotly_chartstudio_tutorial/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pandas import DataFrame
from config import PLOTLY_API_KEY, PLOTLY_USERNAME


# Plotly Chart Studio authentication
set_credentials_file(
username=PLOTLY_USERNAME,
Expand All @@ -22,15 +21,54 @@ def create_chart(stock_df: DataFrame, symbol: str) -> py.plot:
high=stock_df['high'],
low=stock_df['low'],
close=stock_df['close'],
decreasing={
"line": {
"color": "rgb(240, 99, 90)"
},
"fillcolor": "rgba(142, 53, 47, 0.5)"
},
increasing={
"line": {
"color": "rgb(48, 190, 161)"
},
"fillcolor": "rgba(22, 155, 124, 0.6)"
},
whiskerwidth=1,
)],
layout=go.Layout(
title=f'30-day performance of {symbol.upper()}',
font={
"size": 15,
"family": "Open Sans",
"color": "#fff"
},
title={
"x": 0.5,
"font": {"size": 23},
"text": f'30-day performance of {symbol.upper()}'
},
xaxis={
'type': 'date',
'rangeslider': {
'visible': False
},
'type': 'date',
'rangeslider': {
'visible': False
},
"ticks": "",
"gridcolor": "#283442",
"linecolor": "#506784",
"automargin": True,
"zerolinecolor": "#283442",
"zerolinewidth": 2
},
yaxis={
"ticks": "",
"gridcolor": "#283442",
"linecolor": "#506784",
"automargin": True,
"zerolinecolor": "#283442",
"zerolinewidth": 2
},
autosize=True,
plot_bgcolor="rgb(23, 27, 31)",
paper_bgcolor="rgb(23, 27, 31)",
)
)
chart = py.plot(
Expand Down

0 comments on commit faafb61

Please sign in to comment.