May-18-2022, 08:55 PM
(This post was last modified: May-18-2022, 08:55 PM by michel77777.)
Hi,
there is a simple Python appilaction, which reads data from SQL database and shows the result as plotly.graph_objects.
I want the get two values from UI for stock and day and read data from SQl database and show the data with plotly.graph_objects.
At the moment are both data hard coded:
stocksTicker = 'GRVI'
the_day='2021-10-14'
Could you please giv me some instractions how to extend the code to implement the requirements ?
Thanks in advance, Michel
there is a simple Python appilaction, which reads data from SQL database and shows the result as plotly.graph_objects.
I want the get two values from UI for stock and day and read data from SQl database and show the data with plotly.graph_objects.
At the moment are both data hard coded:
stocksTicker = 'GRVI'
the_day='2021-10-14'
Could you please giv me some instractions how to extend the code to implement the requirements ?
Thanks in advance, Michel
df = pd.read_sql(selectString ,con=Engine) trace1 = { 'x': df.t_datetime, 'open': df.o, 'close': df.c, 'high': df.h, 'low': df.l, 'type': 'candlestick', 'name': stocksTicker, 'showlegend': True } # Config graph layout layout = go.Layout({ 'title': { 'text': 'Moving Averages', 'font': { 'size': 15 } } }) fig=go.Figure([trace1]) fig.show()