Skip to content

Commit

Permalink
Merge pull request cockroachdb#29377 from vilterp/backport2.1-29360
Browse files Browse the repository at this point in the history
release-2.1: ui: don't show 125% axis label on percentage chart
  • Loading branch information
vilterp authored Aug 30, 2018
2 parents b569cd4 + c55c6d3 commit 5375efa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import { LineGraph } from "src/views/cluster/components/linegraph";
import { Metric, Axis, AxisUnits } from "src/views/shared/components/metricQuery";

import {GraphDashboardProps, nodeDisplayName, storeIDsForNode} from "./dashboardUtils";
import { GraphDashboardProps, nodeDisplayName, storeIDsForNode } from "./dashboardUtils";

// TODO(vilterp): tooltips

Expand Down
5 changes: 4 additions & 1 deletion pkg/ui/src/views/cluster/util/graphs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class AxisDomain {
const max = extent[1];
if (alignMinMax) {
const alignedMin = min - min % increment;
const alignedMax = max - max % increment + increment;
let alignedMax = max;
if (max % increment !== 0) {
alignedMax = max - max % increment + increment;
}
this.extent = [alignedMin, alignedMax];
} else {
this.extent = extent;
Expand Down

0 comments on commit 5375efa

Please sign in to comment.