Improve inserting of metrics in graph UI.

- Metric will inserted at cursor position.
- Selected text will get replaced.
- Press <tab> to jump to metrics and <return> to jump back.
Clean up of graph UI's form.

- Removed unnecessary spaces and labels.
- Aligned elements for cleaner look.