Problem with candlestick chart in Flask

I am currently working on multipage app that shows cryptocurrency graph. I got data from, made it into df with pandas, and got needed data (time, open, high, low, close), and transformed it into JSON so js script in my graph.html template could get it. I made similar function in template in script in js (plotly.js is already installed) and made div id=‘graph’ with proper CSS styling. When I load page the graph is not loading, what you can see is just empty space for graph. I tried many ways to handle that, search internet for couple of hours for solution and nothing worked. Take into consideration that function which gets data is in registered blueprint (I do not know if that may be the issue), also Flask app is in function in

script js function
`var data = JSON.parse(‘{{ make_graph()|safe }}’);

Plotly.newPlot(‘graph’, [{
x: data.x,
close: data.close,
high: data.high,
low: data.low,
type: ‘candlestick’,
xaxis: ‘x’,
yaxis: ‘y’,
pics of make_graph() and

Thank you in advance