X轴显示1,2,3,4数字递增的,而Y轴显示以下
1000,3000,5000,8000,10000,15000,20000
能否实现,请大家指教,谢谢

解决方案 »

  1.   

        Chart1.BottomAxis.Automatic:= False;
        Chart1.BottomAxis.Minimum:= 0;
        Chart1.BottomAxis.Maximum:= 100;
    这是X轴的,同理Y轴
      

  2.   

    在Chart的GetAxisLabel事件里面写:
    procedure TfmFAIDetail.Chart1GetAxisLabel(Sender: TChartAxis;
      Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
    var
      iMonth: integer;
    begin
      if (Sender = Sender.ParentChart.BottomAxis) then
        if (ValueIndex = -1) then
        begin
          iMonth := StrToIntDef(LabelText, 0);
          if (iMonth > 0) and (iMonth < 13) then
            LabelText := ShortMonthNames[iMonth]
          else if iMonth = 13 then
            LabelText := '總計'
          else
            LabelText := '';
        end;
    end;