Graph_Visualization Code
Brought to you by:
bgaddam
File | Date | Author | Commit |
---|---|---|---|
Readme.txt | 2016-12-20 | bgaddam | [r5] Added Readme.txt for this program |
graph.json | 2016-12-16 | bgaddam | [r2] Changed Graph json to reflect tree structure |
graph2.json | 2016-12-19 | bgaddam | [r3] Added different json |
graphData.php | 2016-12-19 | bgaddam | [r4] added Redraw functionality as specified |
index.html | 2016-12-19 | bgaddam | [r4] added Redraw functionality as specified |
Graph Visualization: I have used "cytoscape" javascript library for rendering graphs. Below are the URLs of Javascript frameworks that are required to run the program and these are included in "index.html" file in script tags JQuery -- http://code.jquery.com/jquery-2.0.3.min.js Cytoscape.js --http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js For Graph layout (i.e., DAG layout) include the following https://cdn.rawgit.com/cpettitt/dagre/v0.7.4/dist/dagre.min.js https://cdn.rawgit.com/cytoscape/cytoscape.js-dagre/1.1.2/cytoscape-dagre.js Running the Program: 1) Please install WAMP / LAMP server based upon your platform. I used Wamp server 2) Upon installing , you will find wamp folder in your C directory. Go to that directory and Put the codebase in the www folder of that direcory. 3) And open your localhost in browser and run index.html file in the code base. Description : This program visualizes the graph contains two main files namely 1)index.html --- This HTML page contains HTML element where the graph needs to be rendered, CSS corresposnding to it and JavaScript code for getting graph data as json from serever 2)graphData.php --- This php fie contains the graph data and whenever the user makes a request to this file through AJAX call it gives the Graph data in the JSON format. It has the two functionalities a) one provides JSON graph data when the page loads b) another provides differnt JSON data when the user cicks redraw button(redrwas the graph with user submitted info through ajax call)