raphv / gexf-js

A JavaScript GEXF viewer
MIT License
302 stars 104 forks source link

Image on Node not woking #6

Open ebacongallo opened 11 years ago

ebacongallo commented 11 years ago

I've been developing social graph using the toolkit + jython on which it runs automated on server. My data has been formated to .gexf (e.g)

Base on the document for visualization; to enable node to have image is by adding But the problem is, it doesn't show at all.

Also, I used the .gexf javascript library (gexf-js) to view it on the browser, but still the images doesn't show.

Can anyone advice on what do on this?

artzub commented 11 years ago

I didn't try this code, but i think that it must work.

ebacongallo commented 11 years ago

Hi artzub,

Thank you for the reply. I'll check this one.

ebacongallo commented 11 years ago

Hi! I tried your code but it doesn't work. And change a bit on

             _shap = _n.find("viz\\:shape,shape"),
             _img = _shap.attr("uri") //name of param which contains data about img url;

            _d.img = new Image();
            _d.img.onload = (function(_nd) { return function() { _nd.loaded = true; }})(_d);
            //_d.img.onerror 
            _d.src = _img;

Due to .gexf XML image format:

          viz:shape value="image" uri="http://graph.facebook.com/100002785904499/picture?type=large"
artzub commented 11 years ago

Try now...

ebacongallo commented 11 years ago

Thanks! Your the man!

The image is now working but the thickness of the edges size increases. (see attached screen) image_node_thick_edges

artzub commented 11 years ago

Changes in my code not affected by the behavior of edges. My decision is superficial... I gave you a way for resolve.

ebacongallo commented 11 years ago

Thanks again. got it fixed.

artzub commented 11 years ago

I hope that I helped you =)

scheckley commented 6 years ago

is there any way for gexf-js to display node avatar images in the side bar for a selected node? (similar functionality as sigmajs exporter currently has)?