title: Simple Delphi DBcharting
body: <p>So, the problem I'm having is that I'm displaying two bars on the graph for each student, I just want one of them. They're the correct height though, so that's good.
  This is my Delphi source code;</p>
  
  <pre><code>strlstField := TStringList.Create();
  ADOQGetResults.SQL.clear;
  ADOQGetResults.SQL.Add(
                        'SELECT Results.StudentID, SUM(Results.Rawmark) as TRM, StudentInfo.Fname '+
                        'FROM (StudentInfo INNER JOIN Results ON StudentInfo.StudentID = Results.StudentID) '+
                        'WHERE (((StudentInfo.StudentID)=Results.StudentID))  AND Results.TestID =12 '+
                        'GROUP BY StudentInfo.Fname, Results.StudentID'
                        );
  ADOQGetResults.Active := True;
  ADOQGetResults.Open;
  
  DBChart1.Title.Text.Clear;
  DBChart1.Title.Text.Add('Class leaderboard');
  DBChart1.Title.Font.Size := 15;
  DBChart1.LeftAxis.Title.Font.Size := 12;
  DBChart1.LeftAxis.Title.Caption := 'Total marks';
  DBChart1.BottomAxis.Title.Font.Size := 12;
  DBChart1.BottomAxis.Title.Caption := 'Student';
  
  //Charting Series
  //To Remove Old Series
  for intCnt := DBChart1.SeriesCount -1 downto 0 do
      DBChart1.Series[intCnt].Free;
  //To Add New Series
  for intCnt := 1 to ADOQGetResults.FieldCount - 1 do
  begin
     strlstField.Add(ADOQGetResults.FieldList[intCnt].FieldName);
     DBChart1.AddSeries(TBarSeries.Create(nil));
  end;
  //To set source for Series
  for intCnt:= 0 to DBChart1.SeriesCount -1 do
  begin
     with DBChart1 do begin
        Series[intCnt].Clear;
        Series[intCnt].Title := strlstField[intCnt];
        Series[intCnt].ParentChart := DBChart1;
        Series[intCnt].DataSource := ADOQGetResults;
        Series[intCnt].XLabelsSource := 'Fname';
        Series[intCnt].YValues.ValueSource := 'TRM';
     end;
  end;
  </code></pre>
  
  <p>I've been trying to work-out whats going wrong all day, so if anyone can help at all I'd be very grateful!
  Here is what the graph looks like right now;
  <a href="http://oi48.tinypic.com/6qelba.jpg" rel="nofollow">http://oi48.tinypic.com/6qelba.jpg</a></p>