add label names to line/text classes