I am using eel in python to run a html frontend and want to display a graph with data from python. For this I need to get my data, which I already formated for js in python. (I don't have a lot of experience with js)
I can't figure out a way to define chart0 globably and then manipulate it in a function and keep the changes. I can't use return because I call this function from python with the data, that I want to end up in js.
let chart0 = [];
eel.expose(get_chart0);
function get_chart0(ch0){
chart0 = ch0;
console.log(chart0); // --> correct output
}
console.log(chart0); // --> empty