1

Could you please tell me why this property (done) in c3js unload doesn't work stable Lightning App Builder? I really appreciate any help.

Follow this demo: Demo in JS

I was trying to clone the above demo to Lightning Component - unloadComp:

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" >
    <div aura:id="chart"></div>
    <ltng:require styles="/resource/C3js/c3.min.css" 
                  scripts="/resource/test3" afterScriptsLoaded="{!c.afterLoad}"/>
</aura:component>

Running the above with lightning application - test give me a result as above demo:

<aura:application >
    <c:unloadComp />
</aura:application>

and this is the result: Result when running in Lightning Application

But when I put it in a lightning app builder, the unload is trigger but the current data doesn't unload, and done function doesn't call as the below result image.

Result when running in Lightning App Builder

Controller

afterLoad : function(component, event, helper) {

        var iElem = component.find("chart").getElement();
        chart.chartView(iElem);
    }

test3.js link: test3.js

  • Please post your controller code as well to better assist? – Mohith Shrivastava Dec 6 '16 at 10:28
  • Hi @MohithShrivastava, I have added the controller code. Thank you for your concern. – ted Dec 6 '16 at 10:34
  • Sorry I meant your test3 file as well – Mohith Shrivastava Dec 6 '16 at 10:37
  • Also where chat.chartview() function defined? – Mohith Shrivastava Dec 6 '16 at 10:39
  • Excuse me for my lack of attachment. I've just added test3.js file. chart.chartView(iElement) defined in test3.js. – ted Dec 6 '16 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.