move process legend directly into drawgraph