Hi,

The problem is that you try to load a js file from raw githubusercontent,
and it will not work because of the mime of the content, if you look closer
to the response you get, you will notice that the file mime is plain text
instead of js. You should use cdn.rawgit instead.

cdn.rawgit.com/tamc/Sankey/master/js/sankey.js
On Jan 22, 2016 12:22 AM, "Suraj" <suraj14...@yahoo.co.in> wrote:

> Yes, problem seems to be with loading .js src files. However, if I provide
> hosted links like
> https://raw.githubusercontent.com/tamc/Sankey/master/js/sankey.js , it's
> still failing.
>
> Accessing of local files works in standalone html/js. Isn't there a way to
> access local js src from Zeppelin note?
>
>
> Sent from Yahoo Mail on Android
> <https://overview.mail.yahoo.com/mobile/?.src=Android>
>
> On Thu, 21 Jan, 2016 at 8:08 PM, Corneau Damien
> <cornead...@gmail.com> wrote:
>
> Hi,
> I don't think the file path for the .js files can be reached this way. You
> would need to point to a hosted file.
> On Jan 21, 2016 7:52 PM, "Suraj" <suraj14...@yahoo.co.in> wrote:
>
>> Hi
>>
>>
>>
>> I am trying to use Sankey diagram from
>> http://github.com/tamc/Sankey/tarball/master  in Zeppelin note; however
>> it is not showing any visual. The example used is
>> ‘tamc-Sankey-c6c6909/examples/simple.html’ from the above tar (same is
>> shown below). I am running it with %angular. The example works standalone
>> (in .html without Zeppelin note). The js src & css (in the script below)
>> are from tar link provided above.
>> Any suggestions on how to make it work? Thanks a lot.
>>
>> Regards,
>> Suraj
>>
>> ----------------code--------------------
>> %angular
>> <script src="file:///media/zeppelin/tamc-Sankey-c6c6909/ext/raphael.js"
>> type="text/javascript"></script>
>> <script src="file:///media/zeppelin/tamc-Sankey-c6c6909/ext/jquery.js"
>> type="text/javascript"></script>
>> <script src="file:///media/zeppelin/tamc-Sankey-c6c6909/js/sankey.js"
>> type="text/javascript"></script>
>> <link rel="stylesheet" href="
>> file:///media/zeppelin/tamc-Sankey-c6c6909/examples/css/style.css" />
>> <script type='text/javascript'>
>>         $(document).ready(function() {
>>         var sankey = new Sankey();
>>
>>         sankey.stack(0,["Top","Bottom"]);
>>         sankey.stack(1,["Merge"]);
>>         sankey.stack(2,["Good","Bad"]);
>>
>>
>>         
>> sankey.setData([["Top",100,"Merge"],["Bottom",50,"Merge"],["Merge",70,"Good"],["Merge",80,"Bad"]]);
>>         sankey.draw();
>>         });
>> </script>
>> <h1 style='width:1000px; text-align: center; margin-bottom: 0'>A very
>> simple Sankey Diagram</h1>
>> <div style='width:1000px; text-align: center; margin-top: 0'>Move your
>> mouse over the diagram to show values</div>
>> <div id='sankey' style="width:1000px;height:1000px">
>>
>> </div>
>>
>

Reply via email to