Page 1 of 1

LinePen.Visible not working if pointers are not visible

Posted: Fri May 15, 2020 6:32 am
by 16586540
I am using TeeChart for Delphi XE10. I wish to draw gridlines on a special graph using an array of line series. However, it seems that I cannot hide the lines unless I make the pointers visible. This fix was promised in 2013 but does not seem to have happened. Here is the code I am using.

Code: Select all

      with fSeriesTriGridX[i] as TLineSeries do
        XValues.Order := loNone;
        YValues.Order := loNone;
        ParentChart := Chart;
        ShowInLegend := False;
        LinePen.Visible := not fHideGridLines;
        Pen.Style := fGridPenStyle;
        if fGridColor = -1  then
          Color := clGray
          Color := fGridColor;
        Active := True;
I have found a workaround by making pointers visible and setting the style to psSmallDot, but this may not always be a satisfactory solution. Is there any plan to be able to hide lines even if pointers are also hidden.
Thanks and regards

Re: LinePen.Visible not working if pointers are not visible

Posted: Mon May 18, 2020 8:36 am
by yeray

I may be missing something (please post the link to the discussion you are referring) but at this moment I'm not sure to understand what's the purpose of a series with both lines and pointers hidden.
The OnGetPointerStyle is fired for those series with Pointer visible. If you hide the pointer (as per default in the Line series) this event isn't fired.
This event can be used to control which pointers or line segments should be drawn when null points aren't enough. And that's the option many customers are happy with. But I may be missing something, of course!