-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gridlines to widget graphs #1541
base: main
Are you sure you want to change the base?
Conversation
for (var i = 1; i <= NumOfXGridlines; i++) | ||
{ | ||
var lineElement = new XElement(PolylineElement); | ||
lineElement.SetAttributeValue(PointsAttr, $"{i * XGridlineHeight},0 {i * XGridlineHeight},{ChartHeight}"); | ||
lineElement.SetAttributeValue(StyleAttr, LightGrayBoxStyle); | ||
chart.Add(lineElement); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces 'static' vertical gridlines to the chart, which is different from the way the charts are presented in Task Manager. If you view the same chart in Task Manager (say, the CPU usage chart), you'll notice that the vertical gridlines move as time progresses.
In this implementation the vertical gridlines stay in one place, are we alright with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we want the gridlines to move in the same way Task Manager does, but I've never asked about it.
@@ -19,8 +19,13 @@ public enum ChartType | |||
|
|||
public const int ChartHeight = 86; | |||
public const int ChartWidth = 264; | |||
private const int NumOfYGridlines = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these numbers? What is magical about them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a bunch of pending questions for Design on what they want here, but since the graphs are so short, 4 lines (one every 20%) seems like it might be the way to go (as opposed to every 10% like in task manager).
Summary of the pull request
Adds gridlines to the widget graphs
References and relevant issues
#1470
Validation steps performed
PR checklist