Commit b8876747 authored by Todd Broch's avatar Todd Broch Committed by Commit Bot

power: Fix rounding error.

BUG=990870
TEST=copy power.js locally to chromeOS device exhibiting failure and
no longer see 'undefined'

Change-Id: I1d79164bdae6e4bf239a7da5581e9f37c813e6f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1777103
Auto-Submit: Todd Broch <tbroch@chromium.org>
Reviewed-by: default avatarSatoru Takabayashi <satorux@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692096}
parent a4f48f93
......@@ -376,7 +376,7 @@ function plotLineGraph(
}
if (width == size) {
drawTimeGuide(x - xOrigin);
drawTimeGuide(Math.round(x - xOrigin));
} else {
drawTimeGuide(Math.round((x - xOrigin) / (width - 1) * (size - 1)));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment