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; |