Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview extension - loading d3.js

hi,

I have posted my extension on github here: https://github.com/wallyflops/d3Graph

I am trying to get d3.js functionality working from within a qv extension. Currently I'm getting the error d3 undefined and was hoping somebody with a little more experience could help me out here? All I'm looking to do is draw a rectange/circle of any size on an SVG inside my qv extension.

I'm sure it's a very simple issue for someone in the know how.

Thanks,

james.

4 Replies
patrik_seger
Partner - Creator
Partner - Creator

Hi James

It looks like your d3 should be defined, so that is strange. Some things that I should do:

  • Skip the loading of the d3.layout.cloud stuff
  • If you can't get rid of d3 undefined, try load it from d3's origin:

          Qva.LoadScript('http://d3js.org/d3.v3.min.js', extension_Done);

  • When I work with this, I debug from server so that I can use Firebug for Firefox to see what happens. You could also use the DevTools in Chrome. If you run inside QlikView, you could use this to get some debug support inside QlikView:

          Qva.LoadScript('https://getfirebug.com/firebug-lite.js#startOpened', function() {

             Qva.LoadScript('http://d3js.org/d3.v3.min.js', extension_Done);

          });

          With this you could at least inspect the DOM and see how far you have reached in your SVG painting.

  • Divide the d3 stuff into multiple rows; it makes it easier to see were things start to go wrong.
  • I do not see any data reading yet, to get acquainted to d3 and SVG, skip the data part first and just paint your hard coded rect.
  • There are tons of material for learning d3, one source may be https://www.dashingd3js.com/table-of-contents

Good luck! It's great fun to see when stuff starts showing up so it's well worth the struggle!

Br Patrik

Not applicable
Author

Eurgh! I spent all day yesterday doing this and a friend fixed it for me... turns out the d3.js I had was not working for some reason. I switched over to the min version like you said and it's all working fine.

Thanks for your write up, anyway it helped greatly.

James.

Not applicable
Author

Hello Team

external objects basic.doc is good, but that is purely for HTML. i need the basic coding for implement the animation chart with the help of D3 Api, Kindly provide me for any chart, i could not able to understand the example coding.

Can any one help me out for this.

Thanks

Srini

Not applicable
Author

@james Waller

James

   can you help me with that coding. kindly forward to srinivasan.rangaswami@gmail.com

Thanks

Srini