¡@

Home 

javascript Programming Glossary: vis

How to layout a non-tree hierarchy with D3

http://stackoverflow.com/questions/11053511/how-to-layout-a-non-tree-hierarchy-with-d3

'C' source 'B' target 'D' source 'C' target 'D' var vis d3.select '#vis' .attr 'transform' 'translate 20 20 ' Build.. target 'D' source 'C' target 'D' var vis d3.select '#vis' .attr 'transform' 'translate 20 20 ' Build initial link elements.. elements Build first so they are under the nodes var links vis.selectAll 'line.link' .data json.links links.enter .append 'line'..

Proper format for drawing polygon data in D3

http://stackoverflow.com/questions/13204562/proper-format-for-drawing-polygon-data-in-d3

seems to be working. Here is what I currently have var vis d3.select #chart .append svg .attr width 1000 .attr height 667.. 0 poly x 0 y 25 x 8.5 y 23.4 x 13.0 y 21.0 x 19.0 y 15.5 vis.selectAll polygon .data poly .enter .append polygon .attr points.. poly x 0.0 y 25.0 x 8.5 y 23.4 x 13.0 y 21.0 x 19.0 y 15.5 vis.selectAll polygon .data poly .enter .append polygon .attr points..

D3.js Zooming and panning a collapsible tree diagram

http://stackoverflow.com/questions/17405638/d3-js-zooming-and-panning-a-collapsible-tree-diagram

d3.svg.diagonal .projection function d return d.y d.x var vis d3.select #box .append svg svg .attr class svg_container .attr.. function d d.y d.depth 50 Update the nodes var node vis.selectAll g.node .data nodes function d return d.id d.id i Enter.. text .style fill opacity 1e 6 Update the links var link vis.selectAll path.link .data tree.links nodes function d return..

Detect if browser tab is active or user has switched away

http://stackoverflow.com/questions/19519535/detect-if-browser-tab-is-active-or-user-has-switched-away

jquery share improve this question Now we can use the visibility API . To deal with the different browser specific syntaxes.. browser specific syntaxes I made this small code var vis function var stateKey eventKey keys hidden visibilitychange.. code var vis function var stateKey eventKey keys hidden visibilitychange webkitHidden webkitvisibilitychange mozHidden mozvisibilitychange..

Is there a way to zoom into a graph layout done using D3?

http://stackoverflow.com/questions/7871425/is-there-a-way-to-zoom-into-a-graph-layout-done-using-d3

to write the redraw function itself. Any suggestions var vis d3.select #graph .append svg svg .call d3.behavior.zoom .on.. simple just setting a transform on the innermost g var vis d3.select #chart .append svg svg .attr width w .attr height.. g' .call d3.behavior.zoom .on zoom redraw .append 'svg g' vis.append 'svg rect' .attr 'width' w .attr 'height' h .attr 'fill'..

How to invoke “click” event programmaticaly in d3?

http://stackoverflow.com/questions/9063383/how-to-invoke-click-event-programmaticaly-in-d3

script type text javascript function var w 600 h 350 var vis d3.select #test .append svg svg .attr width w .attr height h.. h .append svg g .attr transform translate w 2 h 2 var g vis.selectAll g .data x 1 y 2 .enter .append svg g g.append svg..

Adding new nodes to Force-directed layout

http://stackoverflow.com/questions/9539294/adding-new-nodes-to-force-directed-layout

source target findNode target update set up the D3 visualisation in the specified element var w el .innerWidth h el.. element var w el .innerWidth h el .innerHeight var vis d3.select el .append svg svg .attr width w .attr height h var.. 100 .charge 100 .size w h var update function var link vis.selectAll line.link .data graph.links link.enter .insert line..