Andrew,

When I respond with flare=flare I get the & issue, solved by XML()

Uncaught SyntaxError: Unexpected token & 

My script starts with:

<script>

var width = 960,
    height = 2200;

var cluster = d3.layout.cluster()
    .size([height, width - 160]);

var diagonal = d3.svg.diagonal()
    .projection(function(d) { return [d.y, d.x]; });

var svg = d3.select("body").append("svg")
    .attr("width", width)
    .attr("height", height)
    .append("g")
    .attr("transform", "translate(40,0)");

  var flare = {{=flare}} ;    
    
  var nodes = cluster.nodes( flare ),
      links = cluster.links(nodes);

  var link = svg.selectAll(".link")
      .data(links)
    .enter().append("path")
      .attr("class", "link")
      .attr("d", diagonal);

Hope you can give me a crucial hint.


On Wednesday, June 11, 2014 5:49:13 PM UTC+2, Andrew W wrote:
>
> What else is in your view?  Is the code inside a <script>?
> What if you just returned dict( flare=flare) in your controller?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to