Layout algorithm configurable per diagram