不会的,你自己什么地方搞错了。
给你一个例子看看:
procedure TDBChartSummary.ComboBox1Change(Sender: TObject);
begin
Case ComboBox1.ItemIndex of
0: Series1.XLabelsSource:='EmpNo';
1: Series1.XLabelsSource:='PaymentMethod';
2: Series1.XLabelsSource:='#Year#SaleDate';
3: Series1.XLabelsSource:='ShipVia';
4: Series1.XLabelsSource:='Terms';
end;
Series1.SeriesColor:=GetDefaultColor(ComboBox1.ItemIndex);
end;
procedure TDBChartSummary.ComboBox2Change(Sender: TObject);
begin
Case ComboBox2.ItemIndex of
0: Series1.YValues.ValueSource:='#Sum#AmountPaid';
1: Series1.YValues.ValueSource:='#Count#AmountPaid';
2: Series1.YValues.ValueSource:='#High#AmountPaid';
3: Series1.YValues.ValueSource:='#Low#AmountPaid';
4: Series1.YValues.ValueSource:='#Avg#AmountPaid';
end;
end;