Wrong Link (Edge) distance when a graph is drawn with Alchemy.js

I want to draw a weighted graph, which have some weight for every link(edge). And from what I have understood, I should write a function which will return the distance attribute for each link.

Attribute:

window.graphjs.edges.push({"source": window.source[a],
                          "target": window.target[a],
                          "caption": window.weight[a],
                          "linkDistance": window.weight[a]
});

Function:

var config = {
              dataSource: window.graphjs,
              linkDistancefn: function(edge) { 
                 if(edge.self._properties.linkDistance)return (1000/parseInt(edge.self._properties.linkDistance) ); else return 1000;},

 ...         
}

But result graph show wrong, even if distance is correct, the edge will be wrong. Because if distance is big I expect a long edge, if small distance then I expect a short edge to be drawn.

Even IF I have only 3 nodes, and distance between them are: [1,2] = 100 and [1,3] = 200, edges will have wrong sizes, because the expected proportion is 1/2

Is there something I miss or not understand, I don't know

I want to draw correctly graph edges, How to achive this?