Move graph and frame widgets to directives.