Issue with svgweb for Rendering in IE with https://gitorious.org/protovis/jloves-protovis

14 views
Skip to first unread message

Ratish S

unread,
Aug 21, 2011, 4:24:54 AM8/21/11
to protovis
Hi,
I am trying to get ForceDirected example working on IE with svgweb
implementation offered by https://gitorious.org/protovis/jloves-protovis

The snippet of code is below.
It is able to render the nodes and the links on IE too.
But as soon as I try to render nodes with size proportional to the
link strength, it fails with 'size not defined' .

Code :
layout.node.add(pv.Dot)
.size(function(d) (d.linkDegree + 4) * Math.pow(this.scale, -1.5));

But it works fine in Firefox with the original Protovis version
downloaded from http://mbostock.github.com/protovis/

Complete Code:
var vis = new pv.Panel()
.width(500)
.height(400)
.margin(5)
.fillStyle("white")
.strokeStyle("#ccc")
.event("mousedown", pv.Behavior.pan())
.event("mousewheel", pv.Behavior.zoom());;

var layout = vis.add(pv.Layout.Force)
.nodes(miserables.nodes)
.links(miserables.links)
.bound(true);

layout.link.add(pv.Line);


layout.node.add(pv.Dot)
.size(function(d) (d.linkDegree + 4) * Math.pow(this.scale, -1.5));

vis.render();

Q: Is size function not defined for the modified version of Protovis
at https://gitorious.org/protovis/jloves-protovis

Thanks,
Ratish
Reply all
Reply to author
Forward
0 new messages