Thema: Delphi TeeChart Farb-Problem

Einzelnen Beitrag anzeigen

interminator

Registriert seit: 17. Mär 2010
16 Beiträge
 
Delphi 7 Enterprise
 
#5

Re: TeeChart Farb-Problem

  Alt 20. Mai 2010, 11:40
Delphi-Quellcode:
        1: begin
             Query1.Sql.Text :=
               'select'+
               ' DATE_FORMAT(ReDATUM,"%m.%Y") as Datum,'+
               ' ROUND(SUM(u.NetSUMME),2) as UMSATZ_GES'+
               ' from'+
               ' umsatz u'+
               ' where'+
               ' u.QUELLE IN (1,2) and'+
               ' u.STADIUM<7 and'+
               ' u.ReDATUM>= :ZV and u.ReDATUM <=:ZB'+
               ' group by'+
               ' YEAR(u.ReDATUM),'+
               ' MONTH(u.ReDATUM)'+
               ' order by'+
               ' YEAR(u.ReDATUM),'+
               ' MONTH(u.ReDATUM)'+
               ' LIMIT 0,100';
             Query1.ParamByName('ZV').AsDateTime :=Int(ZVon.Date);
             Query1.ParamByName('ZB').AsDateTime :=Int(ZBis.Date);
             Query1.Open;
             BarSerie :=tBarSeries.Create (Self);
             with BarSerie do
             begin
                ParentChart :=DBChart1;
                Active := False;
                Marks.ArrowLength := 20;
                Marks.Style := smsValue;
                Marks.Visible := True;
                DataSource := Query1;
                PercentFormat := '##0 %';
                SeriesColor := 56576;
                ShowInLegend := False;
                ValueFormat := ',#';
                VertAxis := aRightAxis;
                XLabelsSource := 'D';
                BarBrush.Color := clWhite;
                BarPen.Visible := False;
                BarWidthPercent := 65;
                XValues.DateTime := False;
                XValues.Name := 'X';
                XValues.Multiplier := 1;
                XValues.Order := loAscending;
                YValues.DateTime := False;
                YValues.Name := 'Balken';
                YValues.Multiplier := 1;
                YValues.Order := loNone;
                YValues.ValueSource := 'UMSATZ_GES';
             end;
             DBChart1.AddSeries (BarSerie);
             BarSerie.Active :=True;
             DBChart1.View3DOptions.Orthogonal :=True;
             DBChart1.Title.Text.Text :=_('Umsatz pro Monat');
           end;
  Mit Zitat antworten Zitat