Terminal.Gui
Terminal.Gui copied to clipboard
`GraphView` assumes `Frame == Bounds`
Change any of the graph view samples in GraphViewExample.cs to have a border to repro:
e.g.
graphView.BorderStyle = LineStyle.Single;
In addition & related, GraphView has properties duplicative of v2's Frames. E.g.
/// <summary>
/// Amount of space to leave on left of control. Graph content (<see cref="Series"/>)
/// will not be rendered in margins but axis labels may be
/// </summary>
public uint MarginLeft { get; set; }
/// <summary>
/// Amount of space to leave on bottom of control. Graph content (<see cref="Series"/>)
/// will not be rendered in margins but axis labels may be
/// </summary>
public uint MarginBottom { get; set; }
I noticed this as I was reviewing #2981.
If you want to use border in the legend annotations you have two choices:
- Add a
Viewto theGraphViewand set theBorder. - Draw a frame directly to the driver without using a View. Thus the obsolete method would be necessary.
Do you have ani idea for this?
If you want to use border in the legend annotations you have two choices:
- Add a
Viewto theGraphViewand set theBorder.- Draw a frame directly to the driver without using a View. Thus the obsolete method would be necessary.
Do you have ani idea for this?
Since legend annotations are not a View, I have no issue with how you updated the code to use the new View.DrawFrame method you provided in #2982.
The fact that in your View.DraweFrame you defer rendering (via OnRenderLineCanvas) should make magic happen. I opened THIS issue because I was heading down the path of testing whether it would or not. What I mean by magic is:
"If the legend annotation is positioned such that its border touches either theGraphView border or if it's SuperView's border, line-auto-join does what one would expect."
But, until the bug I am reporting in THIS issue is addressed, it's not possible to prove the above will work or not.
I added a view for the legend annotations. See #2982.