I’m using a callback to populate
html.Div(id=‘load-graph’, children=dcc.Graph(id=‘dummy2’)
This is the figure data printed out:
Graph(id='load-vs-time', figure={'data': [Scatter({
'line': {'color': 'rgb(255, 127, 14)', 'width': 1},
'mode': 'lines',
'name': 'Actual',
'opacity': 0.7,
'x': array(['00:00', '00:05', '00:10', ..., '23:45', '23:50', '23:55'], dtype=object),
'y': array([10483.27 , 10479.188, 10401.329, ..., 10133.323, 10064.778, 10030.881])
}), Scatter({
'line': {'color': '#403203', 'width': 1},
'mode': 'lines',
'name': 'Imports',
'opacity': 0.7,
'x': array(['00:00', '00:05', '00:10', ..., '23:45', '23:50', '23:55'], dtype=object),
'y': array([3079.325, 3032.271, 3082.541, ..., 2972.527, 2956.981, 2855.838])
})], 'layout': Layout({
'hovermode': 'closest',
'legend': {'x': -0.3, 'y': 1},
'margin': {'b': 40, 'l': 140, 'r': 100, 't': 100},
'title': {'text': 'Tuesday, April 28, 2020'},
'xaxis': {'mirror': True,
'showgrid': True,
'tickmode': 'array',
'ticktext': [ , 1a, 2a, 3a, 4a, 5a, 6a, 7a, 8a, 9a, 10a, 11a, noon,
1p, 2p, 3p, 4p, 5p, 6p, 7p, 8p, 9p, 10p, 11p, ],
'tickvals': [00:00, 01:00, 02:00, 03:00, 04:00, 05:00, 06:00, 07:00,
08:00, 09:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00,
16:00, 17:00, 18:00, 19:00, 20:00, 21:00, 22:00, 23:00,
24:00],
'title': {'text': 'Time'}},
'yaxis': {'mirror': True,
'range': [0, 14100],
'showline': True,
'ticks': 'outside',
'title': {'text': 'MegaWatts (MW)'},
'zeroline': True}
})})
The x, y data are only partially displayed. ‘Actual’ has 280 items and ‘Imports’ has 276 items.
I worked at UVM for thirty years … Waterman building.