Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
81182: ui: use metric name as custom chart title r=dhartunian,erikgrinaker a=tbg

Custom charts were previously difficult to read because the graph didn't
include any indication of what was being graphed. This is now rectified
by printing the metrics name. This isn't the most user friendly thing
(ideally we would also include the actual title, and make the help text
available) but with my limited TSX knowledge this is solving 90% of the
problem with a 61 character change.

Related to cockroachdb#81035.

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed May 16, 2022
2 parents bc5f5b7 + e46aef2 commit 4fd43e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class CustomChart extends React.Component<
setTimeScale={this.props.setTimeScale}
history={this.props.history}
>
<LineGraph>
<LineGraph title={metrics.map(m => m.metric).join(", ")}>
<Axis units={units} label={AxisUnits[units]}>
{metrics.map((m, i) => {
if (m.metric !== "") {
Expand Down

0 comments on commit 4fd43e7

Please sign in to comment.