PhaedrusTheGreek / transform_vis

Transform Visualization for Kibana
Apache License 2.0
44 stars 32 forks source link

Bug with importing third party JS #17

Open thekofimensah opened 6 years ago

thekofimensah commented 6 years ago

When I import some custom JS libraries, I get the error in the picture I attached. I can't seem to make it go away and it seems like Kibana is trying to load the script before the library is loaded which is causing this error. Any way to get around this? It isn't a nice error to pop up and it happens everytime I sign in.

I get the error when I use either of the following two in the javascript box:

    import_funnelLib: function() {
    $.getScript("https://canvasjs.com/assets/script/jquery.canvasjs.min.js", function( data, textStatus, jqxhr ) {
        console.log("Import Complete");
    });   
 }

or

 before_render: function(){
    $.getScript("https://canvasjs.com/assets/script/jquery.canvasjs.min.js", function( data, textStatus, jqxhr ) {
        console.log("Import Complete");
    });  
 }

And then further down in the javascript box I have: after_render: function() { $("#chartContainer").CanvasJSChart(options);} I think this is where the error is

Any idea what I can do?

screen shot 2018-05-28 at 3 07 01 pm

@PhaedrusTheGreek