Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Sep 13, 2023

Summary of the pull request

Adds gridlines to the widget graphs

References and relevant issues

#1470

Validation steps performed

image

PR checklist

CoreWidgetProvider/Helpers/ChartHelper.cs Outdated Show resolved Hide resolved
Comment on lines 224 to 230
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);
}
Copy link
Contributor Author

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?

Copy link
Contributor

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.

@PankajBhojwani PankajBhojwani marked this pull request as ready for review September 14, 2023 17:11
@@ -19,8 +19,13 @@ public enum ChartType

public const int ChartHeight = 86;
public const int ChartWidth = 264;
private const int NumOfYGridlines = 4;
Copy link
Contributor

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?

Copy link
Contributor

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).

@EricJohnson327 EricJohnson327 marked this pull request as draft January 11, 2024 20:24
@krschau krschau added the Needs-Design Needs input from the design team label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Design Needs input from the design team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widget graphs should have gridlines
3 participants