Make Line Chart from Columns

It might be a better idea to use dataviewjs to execute the initial query, even if that is an ordinary dataview query, and then manipulate that data a little and render it as a graph from within the query. Here are three different threads discussing similar stuff: