Using TeeChart 7.12 I seem to have a clipping problem with the THistogramSeries (please see code below). The Series is initially displayed uncipped below the bottom-axis. This state remains until a value is changed (every 5 minutes). From that moment the behavior is correct.
As you can see in the code I've tried to repaint the series but it only works in the OnClick-event, so that isn't a usable workaround. Resizing does fix the problem, but doesn't occur in my application.
How can I overcome that problem?
TIA
Whookie
Formular:
Code: Select all
object Form1: TForm1
Left = 46
Top = 281
Caption = 'Form1'
ClientHeight = 533
ClientWidth = 687
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Chart1: TChart
Left = 0
Top = 0
Width = 687
Height = 533
AllowPanning = pmNone
Legend.Visible = False
MarginBottom = 0
MarginRight = 6
MarginTop = 6
MarginUnits = muPixels
Title.Text.Strings = (
'TChart')
Title.Visible = False
BottomAxis.DateTimeFormat = 'hh:mm'
BottomAxis.ExactDateTime = False
BottomAxis.Grid.Color = 12040119
BottomAxis.Increment = 0.000694444444444444
BottomAxis.LabelsSeparation = 2
BottomAxis.MinorGrid.Color = 14671839
BottomAxis.MinorGrid.Style = psDot
BottomAxis.MinorGrid.Visible = True
BottomAxis.Title.Visible = False
LeftAxis.Automatic = False
LeftAxis.AutomaticMaximum = False
LeftAxis.AutomaticMinimum = False
LeftAxis.LabelStyle = talValue
LeftAxis.Maximum = 100.000000000000000000
View3D = False
View3DWalls = False
Zoom.Allow = False
Align = alClient
BevelOuter = bvNone
Color = clWhite
TabOrder = 0
OnClick = Chart1Click
ExplicitLeft = -130
ExplicitTop = -44
ExplicitWidth = 817
ExplicitHeight = 577
object RSeries: THistogramSeries
LinePen.Color = 3092437
LinePen.Width = 3
Marks.Callout.Brush.Color = clBlack
Marks.Visible = False
SeriesColor = 3092437
Pen.Color = 3092437
Pen.Width = 3
Transparency = 55
XValues.DateTime = True
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
Data = {
013C0000008EE3388EE338E23F0000000000805140E9933EE9933EE23F000000
0000005640444444444444E23F00000000002052409FF4499FF449E23F000000
000000F03FFAA44FFAA44FE23F0000000000005440555555555555E23F000000
0000002E40B0055BB0055BE23F0000000000E050400BB6600BB660E23F000000
0000002E40666666666666E23F0000000000404F40C1166CC1166CE23F000000
00008031401CC7711CC771E23F0000000000003440777777777777E23F000000
0000804040D2277DD2277DE23F00000000008031402ED8822DD882E23F000000
0000804140898888888888E23F0000000000002440E4388EE3388EE23F000000
00006053403FE9933EE993E23F00000000000014409A9999999999E23F000000
0000605340F5499FF4499FE23F000000000020574050FAA44FFAA4E23F000000
0000003940ABAAAAAAAAAAE23F0000000000002440065BB0055BB0E23F000000
0000803640610BB6600BB6E23F0000000000805640BCBBBBBBBBBBE23F000000
0000005940176CC1166CC1E23F0000000000002640721CC7711CC7E23F000000
0000004E40CDCCCCCCCCCCE23F0000000000805140287DD2277DD2E23F000000
0000803B40832DD8822DD8E23F0000000000004940DEDDDDDDDDDDE23F000000
0000405040398EE3388EE3E23F0000000000803840943EE9933EE9E23F000000
0000005940EFEEEEEEEEEEE23F000000000000F0BF4A9FF4499FF4E23F000000
000000F0BFA54FFAA44FFAE23F000000000000F0BF000000000000E33F000000
00000034405BB0055BB005E33F0000000000002840B6600BB6600BE33F000000
0000005940111111111111E33F0000000000C058406CC1166CC116E33F000000
0000003440C7711CC7711CE33F0000000000003440222222222222E33F000000
00008058407DD2277DD227E33F0000000000002940D8822DD8822DE33F000000
0000803640333333333333E33F0000000000C042408EE3388EE338E33F000000
0000004440E9933EE9933EE33F0000000000003E40444444444444E33F000000
0000004E409FF4499FF449E33F0000000000405040FAA44FFAA44FE33F000000
0000804B40555555555555E33F0000000000804140B0055BB0055BE33F000000
00008056400BB6600BB660E33F0000000000405840666666666666E33F000000
0000005840C1166CC1166CE33F00000000008056401CC7711CC771E33F000000
0000002440777777777777E33F0000000000000440D2277DD2277DE33F000000
00004055402ED8822DD882E33F0000000000E05540898888888888E33F000000
0000805640}
end
object QSeries: THistogramSeries
LinePen.Color = 5296763
LinePen.Width = 3
Marks.Callout.Brush.Color = clBlack
Marks.Visible = False
SeriesColor = 5296763
Pen.Color = 5296763
Pen.Width = 3
Transparency = 55
XValues.DateTime = True
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
Data = {
013C0000008EE3388EE338E23F0000000000003E40E9933EE9933EE23F000000
0000002840444444444444E23F0000000000803B409FF4499FF449E23F000000
0000C05840FAA44FFAA44FE23F0000000000003440555555555555E23F000000
0000405540B0055BB0055BE23F00000000004040400BB6600BB660E23F000000
0000405540666666666666E23F0000000000C04240C1166CC1166CE23F000000
0000A054401CC7711CC771E23F0000000000005440777777777777E23F000000
0000003740D2277DD2277DE23F0000000000A054402ED8822DD882E23F000000
0000405040898888888888E23F0000000000002440E4388EE3388EE23F000000
00006053403FE9933EE993E23F00000000000014409A9999999999E23F000000
0000605340F5499FF4499FE23F000000000020574050FAA44FFAA4E23F000000
0000003940ABAAAAAAAAAAE23F0000000000002440065BB0055BB0E23F000000
0000803640610BB6600BB6E23F0000000000805640BCBBBBBBBBBBE23F000000
0000005940176CC1166CC1E23F0000000000002640721CC7711CC7E23F000000
0000004E40CDCCCCCCCCCCE23F0000000000805140287DD2277DD2E23F000000
0000803B40832DD8822DD8E23F0000000000004940DEDDDDDDDDDDE23F000000
0000405040398EE3388EE3E23F0000000000803840943EE9933EE9E23F000000
0000005940EFEEEEEEEEEEE23F00000000000014404A9FF4499FF4E23F000000
0000003040A54FFAA44FFAE23F0000000000002C40000000000000E33F000000
00000034405BB0055BB005E33F0000000000002840B6600BB6600BE33F000000
0000005940111111111111E33F0000000000C058406CC1166CC116E33F000000
0000003440C7711CC7711CE33F0000000000003440222222222222E33F000000
00008058407DD2277DD227E33F0000000000002940D8822DD8822DE33F000000
0000803640333333333333E33F0000000000C042408EE3388EE338E33F000000
0000004440E9933EE9933EE33F0000000000003E40444444444444E33F000000
0000004E409FF4499FF449E33F0000000000405040FAA44FFAA44FE33F000000
0000804B40555555555555E33F0000000000804140B0055BB0055BE33F000000
00008056400BB6600BB660E33F0000000000405840666666666666E33F000000
0000005840C1166CC1166CE33F00000000008056401CC7711CC771E33F000000
0000002440777777777777E33F0000000000000440D2277DD2277DE33F000000
00004055402ED8822DD882E33F0000000000E05540898888888888E33F000000
0000805640}
end
end
end
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, StatChar, ExtCtrls, TeeProcs, Chart;
type
TForm1 = class(TForm)
Chart1: TChart;
RSeries: THistogramSeries;
QSeries: THistogramSeries;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Chart1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Chart1Click(Sender: TObject);
begin
Chart1.Repaint; // does work but isn't a solution
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
begin
Chart1.ClipPoints := TRUE; // found in the forum, but doesn't work
QSeries.Clear;
RSeries.Clear;
for i := 0 to 59 do
begin
RSeries.AddXY(i, -1);
QSeries.AddXY(i, -1);
end;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
Chart1.Repaint; // would be a solution but doesn't work
end;
end.