--- a/graph.php +++ b/graph.php @@ -9,13 +9,13 @@ function add_node($id, $label, $parent="") { global $format; if ($format == "html") { - // echo "nodes[\"$id\"] = graph.newNode({label: \"$label\"});" . PHP_EOL; + // echo "nodes[\"$id\"] = graph.newNode({label: \"$label\"});" . PHP_EOL; } if ($format == "dot" && $label != "") { - echo "$id [label=\"$label\"];". PHP_EOL; + echo "\"$id\" [label=\"$label\", shape=plaintext];". PHP_EOL; } if ($format == "gexf") { - echo "":">") + echo "":">") ."" ."". PHP_EOL; } @@ -27,7 +27,7 @@ // echo "graph.newEdge(nodes[\"$from\"], nodes['$to'], {color: '$color'});" . PHP_EOL; } if ($format == "dot") { - echo "$from -> $to ".($color != ""? "[color=$color]":"").";". PHP_EOL; + echo "\"$from\" -> \"$to\" ".($color != ""? "[color=$color]":"").";". PHP_EOL; } if ($format == "gexf") { echo "". PHP_EOL; @@ -55,7 +55,7 @@ $rows = $db->get_view("app", "byCanonicalName", null, true)->rows; //print_r($rows); foreach ($rows as $row) { - add_node($row->id, $row->key); + add_node($row->id, $row->value->name); } } catch (SetteeRestClientException $e) { setteErrorHandler($e);