Creating a swim lane chart using d3 [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I need to generate a swim lanes chart similar to the following but with the addition of showing dates on the Y-axis. All of the nodes I need to show are activities with dependencies, no flow control elements.
Is this possible using something like d3 or is there a better javascript library to use for this type of chart? I haven't seen any examples like it, so if it is possible using d3 I'm not sure where I would start. Any tips would be greatly appreciated.

Based on the previous answer and comments, I started down the path of implementing the chart using Raphael.js. After writing 600+ lines of code (mostly framework stuff to make up for its bare bones nature) I discovered that Raphael.js is extremely slow at rendering text. Not sure exactly why, but it's apparently a known issue. In the end it was taking 3.5s to render a chart with 300 items with 80% of the time spent rendering text.
I then started over with d3.js. I found that d3.js is the much better choice when creating data bound charts when legacy browser support isn't a concern. Creating a swim lane chart in d3.js took me about 100 lines of code vs the 600+ for Raphael.js. The d3.js version also has more functionality, looks nicer, and is more responsive.
While the declarative style of d3.js takes some getting used to, it makes working with data super easy. As an added bonus, my chart now renders in about 250 ms :)
See http://bl.ocks.org/1962173 for the final swim lane chart that I created.

In my opinion raphael.js is suitable here. It provides support for all browsers including IE6-8, while d3 works in SVG-enabled browsers only.

Related

JavaScript library to support interactive charts, graphs etc on canvas? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a useful library which would help me in drawing different interactive charts, graphs etc on canvas. Basically i'm designing a web paint like application and adding the functionality of these interactive charts etc. so what i want is, when user clicks the specific chart, he can then click anywhere inside the canvas and the chart appears there with the data given by user in a file(i will handle that once i know the data format and stuff). I tried a few libraries but either they don't support drawing inside canvas or they aren't offering any interactivity... what do you guys suggest me to go for?
As #Pereira said both chartjs and google chart are good solutions. I will also recommend you take a look at:
HighchartsJS (http://www.highcharts.com/)
PolychartJS (http://www.polychartjs.com/)
I hope it helps you.
Here we have someones:
http://www.chartjs.org/
https://developers.google.com/chart/
I think both are good solutions to you.
I just finished a project where we did this using the chart.js library. Clicking bars generates a new, more specific graph based on the clicked bar. I think a big part of what made this possible for us was the use of a RESTful API to manage the data. Check it out if you're interested.

JavaScript library for dynamic network visualization? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What is a good JavaScript library for the visualization of time-evolving/dynamic graphs/networks?
My data is in the form of source -> destination at time triples like the following
A -> B at 100
B -> C at 101
A -> D at 104
C -> D at 105
...
On the screen I would like to see an animation of points connected by edges with edges flickering on and off as time evolves.
I'm also happy to contribute to an open source library that is almost there.
Clarifications:
By graph I mean a set of nodes connected by a set of edges, not a plot
This question is related to (but distinct from) the following question: Graph visualization library in JavaScript
Vis.js, a browser based visualization library, is another option for you. Also, their public repo is active.
I've worked with Sigma.js, which is an open source library exactly for the purpose of drawing network graphs. It's Canvas based, so faster than SVG especially for large networks, but dynamic manipulation of nodes/edges is not as straightforward. One nice feature is you can render Gexf files, created with Gephi or other tools, with very little effort.
Take a look at d3.js: "D3.js is a JavaScript library for manipulating documents based on data" http://d3js.org/
Here's an example of drawing a graph from a dataset: http://bl.ocks.org/mbostock/1153292
Here's an example that shows how to dynamically update data. You could stream it from a server or simulate it by stepping through the data entirely on the client side: http://mbostock.github.io/d3/tutorial/bar-2.html
Have a look at this example by ZoomCharts:
]
Seems this is exactly what you are looking for.
Disclosure: I am co-owner and core developer in ZoomCharts.com

What is a good 2D grid-based path-finding algorithm? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently writing a 2D game in Javascript using the HTML5 <canvas> element. It's coming along very nicely, but i have run into a problem.
The level design for my game is a grid (so path cost moving from one cell to the north/south/east/west cell is 1) with various obstacles occupying various locations in the grid – a lot like a maze, but with a lot more wiggle room. Each individual level is on the order of 400 × 200 cells.
I'm trying to implement an enemy that will seek out the player no matter where they might be, but i'm having trouble trying to translate one of the various path-finding algorithms to fit my situation. Most of the ones i've come across (like A* and Dijkstra) seem to be best suited to 3D or much more complicated 2D situations. I was wondering if it is possible to dramatically simplify these algorithms to better suit my purposes, or if something like the depth-first search would be a more efficient alternative given the level size.
A* is a very common 2D pathfinding algorithm. It might take a little time to wrap your head around what's happening if pathfinding is unfamiliar, but it's not terribly complex. You may just be looking at someone else's example code that's been developed for a more complex application than you intend. There's a good tutorial for understanding the algorithm here.
Check this out https://github.com/qiao/PathFinding.js It has a lot of demos and path finding algothms.
EasyStar.js is a nice looking library that appears to do what you'd like to. I haven't used it myself, but the documentation on the project's github page looks pretty good, and it's probably what I would choose in your position.

Javascript charting library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm trying to visualize data like in this spreadsheet https://docs.google.com/spreadsheet/ccc?key=0AhtsNUEmDE6MdE0ybXppcG1jampsVnBfZWpEZm9vbmc .
So I would have columns for each person and hours on the left hand side. And the ability to color the columns like in the spreadsheet.
I know about raphaeljs or flot ... but I'm not seeing in the examples something that fits with what I need.
Or maybe I'm not looking at it the right way.
Any suggestions about what to use and how to best display what I want ?
Thank you.
EDIT
http://www.saltycrane.com/blog/2010/03/jquery-flot-stacked-bar-chart-example/
I just found this .. and it seems to have everything I described in the spreadsheet.
Thank you for your answers.
Have a look at these links
High-charts - Interactive JavaScript charts for your web pages.
Open Flash Chart 2 - Server side PHP, Perl, Python, Ruby, .NET, Google Web Toolkit and JAVA.
Google Charts - Display live data on your site
zingchart - Build Flash or HTML5 charts and graphs with the latest & greatest features and technologies
pchart - pChart is a PHP class oriented framework designed to create aliased charts
fusioncharts - It can render over 90 charts and gauges in JavaScript (HTML5) and Flash, along with 550 data-driven maps
Try these ones:
http://www.highcharts.com/
http://www.jqchart.com/samples/ChartTypes/StackedColumn
I see in your latest comment you found the stacked bar chart will fit your needs. Most JavaScript charting libraries can accommodate that.
This chart shows a list of libraries and the chart types they support -- http://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks
Your selection of one of these tools will come down to how you want to render the chart once you've made it, and how you'd like your users to be able to interact with/share the chart.
Hmm .. I think flot will actually do all that I need : http://www.saltycrane.com/blog/2010/03/jquery-flot-stacked-bar-chart-example/ - this is a great example and seems to match what I described.

Javascript 3d Graphing utility? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does any one know of any good javascript 3d graphing utility? I know that every site ever recommends Canvas 3d Graph but it is actually quite limiting. For one it only allows graphing with datasets that are within the 1000. Though it does have some capability (with a bit of code modifying) to graph data that are a bit out of its range, nothing out of a complete revamp will allow graphing of data based on time or with values hugely larger than 1000. (I have data values that range into the billions.)
Or should I abandon all hope and either write one myself or look to other technology?
Google O3D is a library for producing 3d-graphics using Javascript. It also has a deprecated plugin, but the newest version uses WebGL.
Check it out here: http://code.google.com/p/o3d/
You'll definitely need to build a small graphing-shell around it, but it shouldn't be hard, especially not if you look closely to the examples provided on the Google-code website.
It uses OpenGL as a backend-technology: rendering lots of polygons, on reasonable hardware, is not a problem at all.

Categories