def callback_test(*args, **kwargs): #pylint: disable=unused-argument
    'Callback to generate test data on each change of the dropdown'

    # Creating a random Graph from a Plotly example:
    N = 500
    random_x = np.linspace(0, 1, N)
    random_y = np.random.randn(N)

    # Create a trace
    trace = go.Scatter(x=random_x,
                       y=random_y)

    data = [trace]

    layout = dict(title='',
                  yaxis=dict(zeroline=False, title='Total Expense (£)',),
                  xaxis=dict(zeroline=False, title='Date', tickangle=0),
                  margin=dict(t=20, b=50, l=50, r=40),
                  height=350,
                 )


    fig = dict(data=data, layout=layout)
    line_graph = dcc.Graph(id='line-area-graph2', figure=fig, style={'display':'inline-block', 'width':'100%',
                                                                     'height':'100%;'})
    children = [line_graph]

    return children
def callback_test ( * args , ** kwargs ) : N = 500 random_x = np . linspace ( 0 , 1 , N ) random_y = np . random . randn ( N ) trace = go . Scatter ( x = random_x , y = random_y ) data = [ trace ] layout = dict ( title = '' , yaxis = dict ( zeroline = False , title = 'Total Expense (£)' , ) , xaxis = dict ( zeroline = False , title = 'Date' , tickangle = 0 ) , margin = dict ( t = 20 , b = 50 , l = 50 , r = 40 ) , height = 350 , ) fig = dict ( data = data , layout = layout ) line_graph = dcc . Graph ( id = 'line-area-graph2' , figure = fig , style = { 'display' : 'inline-block' , 'width' : '100%' , 'height' : '100%;' } ) children = [ line_graph ] return children
Callback to generate test data on each change of the dropdown