Number: 1916
Title: Classes for more layout less code
Submitter: Daniel Werner
Date: Mon Apr 5 10:00:22 2010
Subsys: Other
Version:
System: *-*-
Severity: minor
Problem:
Would be great do be able to define some css like class system inside a graph. This would allow to spare a lot of code on each node or edge or whatever. You would simply write

nodename [class="myClassName"]

and whatever is defined for myClassName would be assigned. Everything defined else for this node would overwrite the class properties, it should be possible to assign more than one class as well.

I didn't thought about a syntax for defining the classes yet but it should be done inside a graph so the classes aren't some global thing, they are definable for one graph and its sub graphs.
Comments:
[erg] It doesn't give you all that you might want, but subgraphs can be used to go a long way. For example, you could have


digraph G {
  node [color=blue]
  {
     node [color=green, shape=box]
     {
          node [shape=triangle]
          c
      }
       b
  }
  a -> b
  b -> c
}

Owner: *
Status: Request