Live data from Hacker News

Vis.js: A Visual Interaction System

visjs.org

11–20 of 54 posts

Re: Vis.js: A Visual Interaction System

#11

Earlier quoted context omitted.

I may be missing something but it seems to be going for the same space as the popular D3.js library: http://d3js.org

d3.js doesn't target (it renders to ) so graph drawing can be pretty slow. Some more alternatives for this scenario (both of which handle fast drawing to : http://trifacta.github.io/vega/ http://sigmajs.org/

This is definitely incorrect. You can use d3.js to target svg, canvas, html, or any other data format that you want. Check out http://bl.ocks.org/mbostock/2647922 for a canvas based example.

I've actually built very similar graphs to the examples shown in vis.js with d3.js. I was a bit surprised that it wasn't just a wrapper library on top of d3.js (plenty of those exist to make working with d3 a little easier).

Re: Vis.js: A Visual Interaction System

#14

Does anyone know why most graph libraries that I see of this type have nodes that seem to bounce all over the place? Is there a practical motivation for this? I would think a less animated version would be more usable.

The computation of the physics simulation (applying forces between nodes, ending once it finds a local minimum) is an intensive process. You could do it all at once but it would probably hang your page for a meaningful time. You could also reduce the framerate or only show the results at the first an final frames, but those also have user interface implications.

Re: Vis.js: A Visual Interaction System

#15
post #11

Earlier quoted context omitted.

d3.js doesn't target (it renders to ) so graph drawing can be pretty slow. Some more alternatives for this scenario (both of which handle fast drawing to : http://trifacta.github.io/vega/ http://sigmajs.org/

This is definitely incorrect. You can use d3.js to target svg, canvas, html, or any other data format that you want. Check out http://bl.ocks.org/mbostock/2647922 for a canvas based example. I've actually built very similar graphs to the examples shown in vis.js with d3.js. I was a bit surprised that it wasn't just a wrapper library on top of d3.js (plenty of those exist to make working with d3 a little easier).

You can target canvas with d3, but you loose much of the abstraction that makes d3 powerful. For example, look at all of the low-level canvas rendering code that is used. Not as powerful as visualizations driven by chaining .data().enter().append().attr() which can easily be re-shaped by swapping html tags and CSS attributes.

d3 really is a three-legged stool of HTML, JS and CSS. When targeting , you loose both HTML and CSS and thus much of the power.

EDIT: I should clarify that I'm thinking of HTML in an abstract sense that also includes SVG. By hooking into the DOM, d3 gets a free scenegraph that makes it easy to modify the components of the visualization without writing low-level code.

Re: Vis.js: A Visual Interaction System

#16
Does anybody know of a site that keep tracks of all these JavaScript visualization libraries, or JavaScript libraries in general?

There are lot of great JS libraries, but it is difficult to keep track. I would like a resource for JavaScript libraries like ruby-toolbox.com is for gems.

If somebody has the time, the data could be pulled with GitHub's search API:

https://developer.github.com/v3/search/

Re: Vis.js: A Visual Interaction System

#17
post #2

Nice, though when I test the examples (edit items [1]), I would expect better than confirm/alert usage. 1. http://visjs.org/examples/timeline/08_edit_items.html

What's wrong with confirm/alert? It's built into javascript, mobile friendly, and a lot less buggy than most libraries.

Re: Vis.js: A Visual Interaction System

#18
post #16

Does anybody know of a site that keep tracks of all these JavaScript visualization libraries, or JavaScript libraries in general? There are lot of great JS libraries, but it is difficult to keep track. I would like a resource for JavaScript libraries like ruby-toolbox.com is for gems. If somebody has the time, the data could be pulled with GitHub's search API: https://developer.github.com/v3/search/

Here's a good non-exhaustive list of JS visualization libraries:

http://selection.datavisualization.ch/

Re: Vis.js: A Visual Interaction System

#20
post #15
post #11

Earlier quoted context omitted.

This is definitely incorrect. You can use d3.js to target svg, canvas, html, or any other data format that you want. Check out http://bl.ocks.org/mbostock/2647922 for a canvas based example. I've actually built very similar graphs to the examples shown in vis.js with d3.js. I was a bit surprised that it wasn't just a wrapper library on top of d3.js (plenty of those exist to make working with d3 a little easier).

You can target canvas with d3, but you loose much of the abstraction that makes d3 powerful. For example, look at all of the low-level canvas rendering code that is used. Not as powerful as visualizations driven by chaining .data().enter().append().attr() which can easily be re-shaped by swapping html tags and CSS attributes. d3 really is a three-legged stool of HTML, JS and CSS. When targeting , you loose both HTML…

I'd argue that much of D3's power comes not from the update pattern for DOM elements, but the reusable components pattern.

http://bost.ocks.org/mike/chart/

Examples in the core library, all compatible with Canvas, include scales, layouts, geographic projections, time/color utilities, CSV/TSV loading, and behaviors (drag/zoom/etc). There's some built-in canvas rendering like d3.geo.path which can be provided a canvas context.

The only things you lose are selections and the convenient transitions that go along with selections. But you can use these to modify and transition the canvas elements themselves!

Post reply on HN