When I preview my chart on the screen, it appears fine.
When I generate a graphic for a report (from the same TChart object), the width for the left/right margins are too big:
When the chart is crated, I checked that the BottomAxis.AutomaticMaximum/AutomaticMinimum are true:
Code: Select all
assert(chtCostToWait.BottomAxis.AutomaticMaximum);
assert(chtCostToWait.BottomAxis.AutomaticMinimum);
Code: Select all
object chtCTW: TChart
Left = 0
Top = 23
Width = 643
Height = 374
AllowPanning = pmNone
BottomWall.Color = clBlack
Legend.Alignment = laBottom
Legend.LegendStyle = lsSeries
Legend.Visible = False
Title.Text.Strings = (
'TChart')
Title.Visible = False
BottomAxis.Axis.Width = 1
BottomAxis.Grid.Visible = False
BottomAxis.MaximumOffset = 56
BottomAxis.MinimumOffset = 56
BottomAxis.MinorTicks.Visible = False
BottomAxis.TicksInner.Visible = False
BottomAxis.Title.Caption = 'Years to Wait'
LeftAxis.Automatic = False
LeftAxis.AutomaticMinimum = False
LeftAxis.Axis.Width = 1
LeftAxis.Grid.Color = clSilver
LeftAxis.Grid.Style = psDashDot
LeftAxis.MinorTicks.Visible = False
LeftAxis.TicksInner.Visible = False
LeftAxis.Title.Caption = 'Average Retirement Withdrawal'
RightAxis.Axis.Width = 1
View3D = False
View3DWalls = False
Zoom.Allow = False
Align = alClient
BevelOuter = bvNone
Color = clWhite
TabOrder = 1
ColorPaletteIndex = 13
object srsCostToWait: TBarSeries
BarPen.Color = clWhite
BarPen.Width = 2
Marks.Arrow.Visible = True
Marks.Callout.Brush.Color = clBlack
Marks.Callout.Arrow.Visible = True
Marks.Callout.Length = 8
Marks.Visible = False
SeriesColor = 9387812
Title = 'Cost To Wait'
Gradient.Direction = gdTopBottom
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Bar'
YValues.Order = loNone
end
end
Thank you,
Ed Dressel