Fix constant display when used in subqueries
Fix legend appended each time the graph is built