Creating charts with dynamic embeds—problem on publish

Hi all,

I’ve created some charts on a site using HTML embeds that pull values from the CMS. I like how they’re shaping up in the designer, but when I publish it’s a hot mess.

I’m hoping that there’s a simple(ish) fix if there’s someone better versed in jquery who can help me.

This is the read-only link (the charts are under the Arizona tab on the home page): https://preview.webflow.com/preview/hope-initiative-covid?utm_medium=preview_link&utm_source=designer&utm_content=hope-initiative-covid&preview=8f4ca0eb9e681b87381e17d072257088&mode=preview

This is the error I’m getting:

jquery-3.4.1.min.220afd743d.js?site=5ea3971c88b3bd51654675f1:2 Uncaught TypeError: Cannot read property ‘id’ of undefined
at HTMLAnchorElement. (webflow.029c80049.js:38)
at Function.each (jquery-3.4.1.min.220afd743d.js?site=5ea3971c88b3bd51654675f1:2)
at k.fn.init.each (jquery-3.4.1.min.220afd743d.js?site=5ea3971c88b3bd51654675f1:2)
at T (webflow.029c80049.js:38)
at HTMLDivElement.y (webflow.029c80049.js:38)
at Function.each (jquery-3.4.1.min.220afd743d.js?site=5ea3971c88b3bd51654675f1:2)
at k.fn.init.each (jquery-3.4.1.min.220afd743d.js?site=5ea3971c88b3bd51654675f1:2)
at g (webflow.029c80049.js:38)
at A (webflow.029c80049.js:7)
at Array.forEach ()

Sincere thanks for any help!

Shannon

Hi @madewithrelish, would you have the link to the published site ? From you rerror message, it seems there is a reference to an id in your script which was not defined as a proper variable, or not set in your layout.

Hi @anthonysalamin, this is the link to the published site: https://hope-initiative-covid.webflow.io/. Thanks so much for taking a look.

mmh interesting, i can’t see where this id error comes from.

@PixelGeek, I created these charts based on some of your tutorials, but I’m using quite a few more data points. Maybe it’s not possible? Any chance you could take a look and let me know if you have ideas about why this wouldn’t work? Many thanks!

Is there a reason why you’re using grid component to layout your charts ? What about using simple divs and set explicitly position relative to their parent, right now everything is set to static.
I would also try, on a new page, to duplicate and clean your layout as much as possible to only have your charts and nothing else, it will be easier to trouble shoot the issue.

Thanks for the recommendation, @anthonysalamin. Putting the charts on a separate page got rid of the jquery error, which allowed me to locate the real problem, which is that the divs in my embed weren’t closed correctly. Sigh. I think it’s fixed now. I really appreciate your time!

1 Like