Just as Windows visio can do.
See example at https://graphviz.org/docs/attrs/rankdir/
problems solved, thanks a lot~