Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function send(){
- $.post("/", {adj_data: JSON.stringify(adj_list)}, function(data, status) {
- colorify_graph(JSON.parse(data));
- });
- }
- function colorify_graph (data){
- for (var i=0; i<=node_set.length; i++){
- ctx.fillStyle = colorset[data[i+1]];
- ctx.beginPath();
- ctx.arc(node_set[i].x, node_set[i].y, 10, 0 , 2 * Math.PI, false);
- ctx.fill();
- ctx.closePath();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement