I have multiple org charts on separate pages, but all within the same page library of the same site. I've added custom css and javascript to them, and it seems that at least the javascript is shared across all org charts within the same site? Is this correct?
If so, is there a way to get unique javascript for each org chart? I'm customising each of them in different ways, so its annoying that they're all getting the same custom code.
As long as your Org Charts aren't embedded directly on the same page, they shouldn't interfere with one another.
Even if they are on the same page, the only conflict would stem from the CSS, as the Org Chart's HTML elements have the same classes, which means any styling changes would be applied to all instances on one page.
Definitely on different pages. I added a button to the top of the org chart on one page via custom javascript, and now that button is visible on all of the pages. I thought it might be a caching issue, but even browsing with cache disabled the button still appears on each page.
Another issue I've noticed - I don't think its related, but you never know - when I set custom CSS, it's never visible when I next configure the web part. It's definitely still there, as it's being applied, but it's not visible in the custom code editor.
Also not sure if it's related, but I get the error message about only a tenant administrator can edit javascript, even though I am a tenant administrator, and obviously the code is being saved. Just not sure if the message was supposed to be visible when the user is a tenant administrator.
I just did a little digging and was able to list the tenant properties for my site. I can definitely see the custom javascript stored against what I assume is guid identifier for the specific instance of the org chart web part. So therefore it seems the code is being stored properly, but Sharepoint is doing something weird when retrieving the code when the page is viewed. I'll see what else I can work out.