Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1447)

Unified Diff: packages/charted/lib/core/text_metrics.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/charted/lib/core/scales/ordinal_scale.dart ('k') | packages/charted/lib/core/utils/lists.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/charted/lib/core/text_metrics.dart
diff --git a/packages/charted/lib/core/text_metrics.dart b/packages/charted/lib/core/text_metrics.dart
index 9fb7d06d93eba4c4c4c818f5984f03f9af8cdede..a84f8289c690263cfbbfe7bc053308018c3f9c8e 100644
--- a/packages/charted/lib/core/text_metrics.dart
+++ b/packages/charted/lib/core/text_metrics.dart
@@ -100,6 +100,7 @@ class TextMetrics {
min = mid + 1;
}
}
+ if (max < 0) max = 0;
text = text.substring(0, indices[max]) + '…';
}
return text;
« no previous file with comments | « packages/charted/lib/core/scales/ordinal_scale.dart ('k') | packages/charted/lib/core/utils/lists.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698