ComboBox에서 선택한 것을 DBChart ( pie 형태 )로 보여주고 싶은데요....
잘 안되네요....초보라서요...알려주세요....
procedure TForm7.Button1Click(Sender: TObject);
var
item : string;
begin
item := ComboBox1.Items.Strings[ComboBox1.itemIndex];
Query1.SQL.Clear;
Query1.SQL.Add( 'select count(' + item + ') as cnt, '+ item + ' from member group by '+ item);
try
Query1.Active := true;
Series1.DataSource := Query1;
Series1.Labels := item;
Series1.PieValues := cnt;
Except
showmessage('에러');
end;
end;