Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dash/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def element(element='div', attributes={}, content=''):
content = content

el = '<{}'.format(element)
for attribute, value in attributes.iteritems():
for attribute, value in attributes.items():
el += ' {}="{}"'.format(attribute, value)
el += '>'

Expand Down
2 changes: 1 addition & 1 deletion example-3-click-events.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def onpong(app_state):

@socketio.on('replot')
def replot(app_state):
print app_state
print(app_state)
messages = dash.replot(app_state)
emit('postMessage', json.dumps(messages,
cls=plotly.utils.PlotlyJSONEncoder))
Expand Down
6 changes: 3 additions & 3 deletions example-4-tickers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ def replot(app_state):


def update_graph(app_state):
print app_state
print(app_state)
ticker = app_state['ticker']
if ticker not in tickers:
print ticker, 'not in tickers'
print(ticker, 'not in tickers')
return
else:
try:
df = web.DataReader(ticker, 'yahoo', dt.datetime(2014, 1, 1),
dt.datetime(2015, 4, 15))
except:
print traceback.format_exc()
print(traceback.format_exc())
return

messages = [
Expand Down