add x/y-legend.
TODO: need optimize x-legend.