Communication between HTML element and Page Code

I managed to create an HTML element using Google Charts. Here is part the code:


This works perfectly fine on my web page.


However instead of using predetermined data directly into the HTML element above, I would like to get data from local storage (because I don’t know the numbers in advance, they result from a process). So instead of 10, 20, 30, 20, 25, 40,15 I would use:

local.getItem(“locrodeo”);
local.getItem(“loccalypso”);
local.getItem(“locbalthazar”);
local.getItem(“locmistral”);
local.getItem(“locsaya”);
local.getItem(“locluna”);
local.getItem(“lockiara”);
However it seems that JavaScript operating within the HTML element isn’t able to find this local data. So I guess I would need to push the data from the Page Code to the HTML Element. I have no idea how to do this. Any help available?

1 Like

maybe you can use postmessage: postMessage - Velo API Reference - Wix.com

examples: