Analyzing query results in charts