I would like to use d3.js to build a pedigree tree.
All exemples that I found are showcasing organic trees.
Are there any exemples out there with a pedigree like style ?
You could accomplish this using either the cluster or tree layouts. And using a custom path generator to draw orthogonal lines connecting nodes, as in this elbow dendrogram. I guess I was feeling inspired so I gave it a shot:
http://bl.ocks.org/2966094
I recently created some examples of using D3 to draw pedigrees in the style that most software does. There are examples for showing how to make it expand and collapse, transitions, and showing descendants as well as ancestors.
Related
I would like to know if there is a good JS framework to convert an area map into a plottable one.
For example, if I have a map like this which identifies parkinglots with numbers, I want to identify the occupied lots with red color and vacant lots with other color.
What would be the best framework to achieve this. I saw D3.js but it has too much learning curve and we need to hard-code fixed points on an svg area. I'm looking for a quick alternative which could be a wrapper library of D3.js similar to what nvd3 is for charts
You might want to take a look at http://processingjs.org/ -- it is NOT a wrapper around D3, but it's designed to be easy to use.
(FWIW, I stopped using processing.js once I discovered D3 -- I like D3's flexibility despite the steeper learning curve.)
This post might be useful: https://forum.processing.org/one/topic/interactive-svg-map-with-processing-js.html
How to make orthogonal edges with Cytoscape.js?
I have seen this Github issue, but didn't get solution.
Use the segments style feature mentioned/developed in the issue: http://js.cytoscape.org/#style/segments-edges
There's a demo of all edge types you can reference as well: http://js.cytoscape.org/demos/18504640d9a03c178fff/
I am brand new to working with with d3.js
I am trying to change the style of the links in the interactive-tree example that comes packaged with d3.js
https://github.com/mbostock/d3/blob/master/examples/tree/tree-interactive.html
they are currently beziers, and I would like them to be angular, i.e. visio class diagram style connections.
seems that there needs to be some extra definition of the diagonal around lines 42-43, but I can't tell from the documentation what that would be.
any help is most appreciated.
You can't do that with d3.svg.diagonal. Have a look at d3.svg.line and in particular the interpolate function.
I've an application that based on some values from different inputs (temperature, humidity...), show different charts.So far I've done that with JpGraph, and I found it pretty easy to do. You can add a legend easily, and plot as many functions as you want. You can also fix the scale easily. Regardless of that, I would like to have some interactivity with the user (I just want that one the user clicks on a point of the graph, the X and Y value are shown). That is not easy to do with JpGraph because it is just a PNG image.
I was recommended to use Raphael JS library, and I've been reading to the documentation (Raphael JS Reference), but I don't see that what I want to do (line charts) is that simple.
So, I am asking, to both Jpgraph users and Raphael JS users if they had had experience with this, and if there is any good tutorial online (I have not able to find one that works with line charts). The kind of graphs I'm drawing now are like this: JpGraph Example
Some other options:
D3.js (SVG)
JSXGraph (SVG and VML for IE)
Protovis (SVG)
There is a chart plugin for Raphael. It supports line charts. The documentation is certainly lacking - but there is always the source.
Answering myself. After doing some research, I found this one pretty interesting for doing line charts:Grafico
While learning graph algorithms and canvas HTML element it stuck me that i should have a small graph library of my own in javascript which shows the graphs using canvas element can you point me in right direction so as i can read some code[js/python] as on how to display the graphs and write my own little lib.
PS : i mean edges and Node grapth not the bars and pie charts.
There are quite a few ways to display graphs using various layout algorithms. Two of the primary ones are a Force-Directed layout algorithm, which can be a continuous layout algorithm using a push-pull principle. Next is the GEM layout algorithm which uses a rudimentary physics approach to determine the best "fit".
Here are some examples:
http://vis.stanford.edu/protovis/ex/force.html
bitbucket.org/bwalenz/algorithms/src/
Protovis has probably the most functional. The bitbucket link is an implementation of the GEM algorithm but with no visualization. It just lays out the nodes/edges.
Not really using canvas, but quite a good JS solution for graphs: Raphael Charting plugin
The good thing about Raphael is that it works in all browsers, IE included.
Great lib, for graphics in canvas: processing.js:
http://processingjs.org/
this is a graphic library, that allows you to write build amazing visualization using simple javascript code. have a look.