Skip to content

improve graphs in team lookup#126

Merged
leok18 merged 3 commits intomasterfrom
improve-graphs
Mar 5, 2026
Merged

improve graphs in team lookup#126
leok18 merged 3 commits intomasterfrom
improve-graphs

Conversation

@leok18
Copy link
Contributor

@leok18 leok18 commented Mar 1, 2026

No description provided.

@leok18 leok18 requested a review from MangoSwirl March 1, 2026 22:48
axisNameWidget: Text(analysisFunction
.metric.abbreviatedLocalizedName),
axisNameWidget: Text(
"${analysisFunction.metric.abbreviatedLocalizedName} ${analysisFunction.metric.units != "" ? "(${analysisFunction.metric.units})" : ""}"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no units for a metric, it would probably make more sense to store it as null instead of an empty string. I also generally recommend avoiding nesting ternaries like this.

There's also a trailing space if there are no units.

.valueVizualizationBuilder(value),
),
),
maxIncluded: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true is the default for maxIncluded, so this change doesn't affect the behavior. Were you looking to disable it? That might make the labels more readable for users

child: Text(numToStringRounded(value)),
);
},
reservedSize: 50),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably reduce the reservedSize now that unit names are taking up less space

lib/metrics.dart Outdated
bool hideFlag;
double? max;

String units;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should perhaps be nullable

String units;
String path;

String Function(dynamic)? valueToString;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were we going to make this add the units on by default?

localizedName: "Scoring Rate (Fuel / Second)",
abbreviatedLocalizedName: "Scoring Rate",
valueToString: ((p0) => "$p0 bps"),
units: " bps",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this " bps" while feeding rate is "bps"?

@leok18 leok18 requested a review from MangoSwirl March 5, 2026 02:21
Copy link
Member

@MangoSwirl MangoSwirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is a much better way to do it. Looks good!

@leok18 leok18 merged commit 513e56f into master Mar 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants