# N\_internal is firing but graph is not updating

**URL:** https://community.plotly.com/t/n-internal-is-firing-but-graph-is-not-updating/38395
**Category:** Dash Python
**Created:** [April 25, 2020, 3:10pm UTC](https://community.plotly.com/t/n-internal-is-firing-but-graph-is-not-updating/38395 "2020-04-25T15:10:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shad](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@shad](https://community.plotly.com/u/shad)
#### Post date: [April 25, 2020, 3:10pm UTC](https://community.plotly.com/t/n-internal-is-firing-but-graph-is-not-updating/38395/1 "2020-04-25T15:10:11Z")

</div>

Would appreciate any guidance. I thought i had this working but not so.  
My csv file i confirmed is updating and the n\_internal seems to be firing but graph is not updating. Any guidance would be appreciated.

```auto
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd

#df_data_to_chart = pd.read_csv(r'C:\Users\shadm\PycharmProjects\ExchangeProj\XXRPZEUR_Crypto_Price.csv')
#crypto_ticker = df_data_to_chart.loc[0]['Ticker']

app = dash.Dash( __name__ )
app.layout = html.Div(
    [
        dcc.Graph(id='live-graph', animate=True),
        dcc.Interval(id='interval-component', disabled=False, interval=6000, n_intervals=0, max_intervals=-1)
    ]
)

@app.callback(Output('live-graph', 'figure'),
              [Input('interval-component', 'n_intervals')])
def update_graph(n):
    df = pd.read_csv(r'C:\Users\shadm\PycharmProjects\ExchangeProj\XXRPZEUR_Crypto_Price.csv')
    print(f"you've clicked {n} times")
    #print('this is df_index', df.index)
    return {'data': [{
        'x': df['Date'],
        'y': df['Close'],
        'type': 'scatter'
    }],
        'layout': {
            'margin': {'b': 0, 'r': 10, 'l': 60, 't': 0},
            'legend': {'x': 0},
            'xaxis': {'title': 'Time', 'rangeslider':{'visible':True}},
            'yaxis': {'range': [min(df['Close']) , max(df['Close']) ], 'title': 'Price $'}
        }
    }

if __name__ == ' __main__':
    app.run_server(debug=True)

```

---

<div class="post-metadata">

### Author: ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)
#### Post date: [April 26, 2020, 4:03pm UTC](https://community.plotly.com/t/n-internal-is-firing-but-graph-is-not-updating/38395/2 "2020-04-26T16:03:18Z")

</div>

Hi @shad, when you print the dataframe in your callback (or `df.tail()` if it’s the end of the csv file which is updated), does it update?
