As @devinthecloud points out in his Blog post Salesforce Winter 16 wrecked C3 charts on the pages he and I had developed. he found the removal of <apex:form> fixed the issue on his pages, but on my page the charts were still broken, so instead of this:
You get this
I stripped the page down to a bare minimum that you can use to recreate the issue, see below,
This let me narrow it down to the Salesforce header.
when you set showHeader=”true” it breaks
if you set showHeader=”false” it starts working
As this is obviously and provably down to a change in winter 16 I can raise it with Salesforce and get a fix.
“At times, Client Side JS conflict with SFDC header JS will collide with already defined functions with the same name.”
Ah it’s nice to see that young Internet companies have the same grasp of customer service as the traditional IT companies and thus it falls back on consultants to fix, in this case with an Iframe, I’m not a fan of Iframes normally but as Salesforce use them themselves there is precedent
And so we now split our single page into 2 pages, an inner content and an outer Iframe wrapper
First we take out the existing page (it was called “chart_test”), rename it to “chart_test_inner” and set showHeader=”false”
Then we put in a Iframe wrapper with the old name and a bit of CSS to make it size properly then point it to the inner content
And now instead of a broken
We have a working