Plugin not toggling to visible

Hi all,

Right off the bat, let me apologize for not posting a link to the app. It has sensitive client information, and I’d like to avoid the work of spinning off a sanitized replica if possible.

I’ve created a custom plugin that creates timeline charts via Google Charts. It works great in my test app.

In my primary app, it works only when it starts as visible. Here is the setup:

My app is a single page app and pages are set to become visible depending on a state in my index page. This particular chart is on an item detail page, where the page is originally rendered blank and when a user clicks on the item in a list table, it takes them to this detail page where data is filled in.

Both the “element is visible on page load” for the chart element and the “support standard visibility” boxes are checked. I’ve tested that, when loaded on to an element thats visible from the beginning, it shows. When loaded on an element that starts invisible, it will never become visible.

I’ve tried this with loading the chart data directly from an API, from a state on the page, from a repeating group on the page, and from Bubble’s data tables. Everything loads just fine…the element just will not become visible.

Does anyone know what I’m missing?

I suggest you to try this: Remove Visible on page load. Go in Condition, and set a Condition where the Parent container is visible. Set visible to Plugin. If the parent is the page, set the condition When page is loaded (entire).

1 Like

Found the problem! It wasn’t a Bubble issue, it was me being dumb.

For posterity, in case anyone else runs into this in the future:

I had two google charts on the page. They were loaded into a div that I attached to the canvas…with a hardcoded name. Because of that, one chart loaded into the div, and then a second loaded in and overwrote the first.

I fixed the issue by setting the chart’s new div to be named a random string. Now every instance of the plugin generates its own unique div.

1 Like