2

Exactly as this question, I want to embed this particular example on my blog.

I tried using <iframe> but bl.ocks.org isn't supporting it anymore. I tried with <iframe> using rawgit but this too didn't work. I tried using the method given here and it works! but for my example it doesn't.

I have inspected both of these sites (this one) and (this too), and found out that in my case the d3 script isn't appending any svg element in my custom div. ( Please look at this answer for the method I used )

Please suggest me how to proceed with this.

Ankit Panda
  • 198
  • 1
  • 17
  • Your question should be self contained and shouldn't rely on links to be complete. Links should be there only as sources and additional information. – Emile Bergeron Jun 01 '17 at 19:27

1 Answers1

2

I solved this by:

  1. creating another folder in _includes in the main Jekyll directory and placing my custom .js files in it.
  2. Then change d3.select("body").selectAll("svg") to d3.select("div#example").append("svg").

Finally it renders the custom .js files alright.

Ankit Panda
  • 198
  • 1
  • 17