Defining methods for line and bar to create visual layout