I use TeeChartPro 6.01 and Delphi 6.
I can't manage a BottomAxis to display dates "as is".
To have a visual representation of my problem, please copy & paste on a new Delphi form the code at the end of my message.
This is a bar chart, with 2 series, side by side.
X values are end-of-year dates, Y values are numbers.
Well, the chart displays dates from january 1st, instead of december 31st. I set BottomAxis.increment=365, and BottomAxis.ExactDateTime=true.
I can understand, the ExactDateTime rounds to the 1st day of the year, but if I set BottomAxis.ExactDateTime=false, the chart displays dates starting from current date.
In conclusion, question is: how can I display the exact date I have in my datas? Have I to put my date values as "Text" instead of "X values"?
Regards
Code: Select all
object Chart2: TChart
Left = 0
Top = 33
Width = 725
Height = 393
Legend.ColorWidth = 10
Legend.Font.Charset = ANSI_CHARSET
Legend.Font.Name = 'Tahoma'
Legend.Gradient.Direction = gdBottomTop
Legend.Gradient.EndColor = 14737368
Legend.Gradient.MidColor = clWhite
Legend.Gradient.StartColor = 14737368
Legend.Gradient.Visible = True
Legend.Shadow.HorizSize = 1
Legend.Shadow.VertSize = 1
Legend.Symbol.Width = 10
Legend.TopPos = 9
Legend.VertSpacing = 3
MarginRight = 5
Title.Font.Charset = ANSI_CHARSET
Title.Font.Color = clNavy
Title.Font.Height = -12
Title.Font.Name = 'Tahoma'
Title.Font.Style = [fsBold]
Title.Text.Strings = (
'Grafico dell''andamento della performance annua:')
Title.Visible = False
BottomAxis.Grid.Color = clSilver
BottomAxis.Increment = 365
BottomAxis.MinorTickCount = 0
LeftAxis.Grid.Color = clSilver
LeftAxis.MinorTickCount = 0
View3D = False
Align = alClient
Color = clWhite
TabOrder = 0
object Series4: TBarSeries
BarPen.Visible = False
Marks.Arrow.Visible = False
Marks.ArrowLength = 0
Marks.Callout.Brush.Color = clBlack
Marks.Callout.Arrow.Visible = False
Marks.Callout.Length = 0
Marks.BackColor = 14740222
Marks.Color = 14740222
Marks.Frame.Visible = False
Marks.Shadow.HorizSize = 0
Marks.Shadow.VertSize = 0
Marks.Style = smsValue
Marks.Visible = True
SeriesColor = clRed
Title = 'Benchmark (%)'
AutoMarkPosition = False
BarWidthPercent = 60
Dark3D = False
Gradient.Direction = gdTopBottom
OffsetPercent = 1
SideMargins = False
XValues.DateTime = True
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Barre'
Data = {
010500000000000000607AE14000000000000000000000000000A8E140333333
333333234000000000A0D5E1400000000000404140000000006003E240CDCCCC
CCCCCC30C0000000000031E24066666666666637C0}
end
object Series5: TBarSeries
BarPen.Visible = False
Marks.Arrow.Visible = False
Marks.ArrowLength = 0
Marks.Callout.Brush.Color = clBlack
Marks.Callout.Arrow.Visible = False
Marks.Callout.Length = 0
Marks.BackColor = 15531993
Marks.Color = 15531993
Marks.Font.Charset = ANSI_CHARSET
Marks.Font.Name = 'Tahoma'
Marks.Frame.Visible = False
Marks.Shadow.HorizSize = 0
Marks.Shadow.VertSize = 0
Marks.Visible = True
SeriesColor = clGreen
Title = 'Performance (%)'
AutoMarkPosition = False
BarWidthPercent = 60
Dark3D = False
Gradient.Direction = gdTopBottom
OffsetPercent = 1
SideMargins = False
XValues.DateTime = True
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Barre'
Data = {
010500000000000000607AE140CDCCCCCCCC4C3F400000000000A8E140CDCCCC
CCCC4C3F4000000000A0D5E140CDCCCCCCCC4C3F40000000006003E240CDCCCC
CCCC4C3F40000000000031E240CDCCCCCCCC4C3F40}
end
end
object TeeCommander2: TTeeCommander
Left = 0
Top = 0
Width = 725
Height = 33
Panel = Chart2
Align = alTop
ParentShowHint = False
TabOrder = 1
end