Page 1 of 1

How can I prevent the grid drawing through the legend?

Posted: Fri Aug 21, 2015 9:03 am
by 16568291
I have the grid lines enabled for the Left Axis and want to show the legend inside the chart on the top. It works but the grid lines get drawn through the legend, which I don't want. I have not enabled transparency. Am I missing a setting?

Screenshot:
legend.png
legend.png (6.07 KiB) Viewed 3832 times
Settings:

Code: Select all

  object TheChart: TChart
    Left = 0
    Top = 26
    Width = 320
    Height = 214
    AllowPanning = pmNone
    Foot.Visible = False

    Legend.Alignment = laTop
    Legend.Brush.Color = clWhite
    Legend.LegendStyle = lsSeries
    Legend.ResizeChart = False
    Legend.Shadow.Visible = False
    Legend.Symbol.Shadow.Visible = False

    SubFoot.Visible = False
    SubTitle.Visible = False
    Title.Text.Strings = (
      '')
    Title.Visible = False
    BottomAxis.Automatic = False
    BottomAxis.AutomaticMaximum = False
    BottomAxis.AutomaticMinimum = False
    BottomAxis.ExactDateTime = False
    BottomAxis.Grid.Visible = False
    BottomAxis.Increment = 1.000000000000000000
    BottomAxis.LabelsAngle = 90
    BottomAxis.LabelsOnAxis = False
    BottomAxis.LabelsSeparation = 0
    BottomAxis.LabelStyle = talValue
    BottomAxis.Maximum = 33.000000000000000000
    BottomAxis.Minimum = -1.000000000000000000
    BottomAxis.Title.Caption = 'Laser Number'
    LeftAxis.Automatic = False
    LeftAxis.AutomaticMaximum = False
    LeftAxis.AutomaticMinimum = False
    LeftAxis.Grid.Color = clSilver
    LeftAxis.Maximum = 4200.000000000000000000
    LeftAxis.Minimum = -10.000000000000000000
    LeftAxis.Title.Caption = 'Digits'
    RightAxis.Visible = False
    TopAxis.Visible = False
    View3D = False
    Zoom.Allow = False
    OnGetNextAxisLabel = TheChartGetNextAxisLabel
    Align = alClient
    TabOrder = 0
    DesignSize = (
      320
      214)
    ColorPaletteIndex = 13
    object ser_Lasers: TBarSeries
      BarBrush.BackColor = clDefault
      Marks.Arrow.Visible = True
      Marks.Callout.Brush.Color = clBlack
      Marks.Callout.Arrow.Visible = True
      Marks.Visible = False
      SeriesColor = clLime
      Title = 'Values'
      Gradient.Direction = gdTopBottom
      Shadow.Color = 8882055
      XValues.Name = 'X'
      XValues.Order = loNone
      YValues.Name = 'Bar'
      YValues.Order = loNone
    end
    object ser_Nulled: TFastLineSeries
      Marks.Arrow.Visible = True
      Marks.Callout.Brush.Color = clBlack
      Marks.Callout.Arrow.Visible = True
      Marks.Visible = False
      Title = 'Nulled'
      IgnoreNulls = False
      LinePen.Color = 10708548
      TreatNulls = tnDontPaint
      XValues.Name = 'X'
      XValues.Order = loAscending
      YValues.Name = 'Y'
      YValues.Order = loNone
    end
    object ser_Geneigt: TFastLineSeries
      Active = False
      Marks.Arrow.Visible = True
      Marks.Callout.Brush.Color = clBlack
      Marks.Callout.Arrow.Visible = True
      Marks.Visible = False
      SeriesColor = clRed
      Title = 'Geneigt'
      IgnoreNulls = False
      LinePen.Color = clRed
      TreatNulls = tnDontPaint
      XValues.Name = 'X'
      XValues.Order = loAscending
      YValues.Name = 'Y'
      YValues.Order = loNone
    end
  end

Re: How can I prevent the grid drawing through the legend?

Posted: Fri Aug 21, 2015 3:46 pm
by yeray
Hello,

I've tested it with TeeChart Pro v2015.15 and the legend isn't transparent for me here.
What TeeChart version and IDE are you using?