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

Unified Diff: sky/examples/stocks/companylist.sky

Issue 950073002: Make the stocks app slightly prettier. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | sky/examples/stocks/stock.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks/companylist.sky
diff --git a/sky/examples/stocks/companylist.sky b/sky/examples/stocks/companylist.sky
index 8e4743215ca534381716a30f80a683374b0850f5..998344b987ba224d421b56f47b2d4e9f0e83e772 100644
--- a/sky/examples/stocks/companylist.sky
+++ b/sky/examples/stocks/companylist.sky
@@ -1,4 +1,6 @@
<script>
+import "dart:math";
+
// Snapshot from http://www.nasdaq.com/screening/company-list.aspx
// Fetched 2/23/2014.
// "Symbol","Name","LastSale","MarketCap","IPOyear","Sector","industry","Summary Quote",
@@ -2973,6 +2975,7 @@ class Stock {
String name;
double lastSale;
String marketCap;
+ double percentChange;
Stock(this.symbol, this.name, this.lastSale, this.marketCap);
@@ -2986,6 +2989,8 @@ class Stock {
symbol = fields[0];
name = fields[1];
marketCap = fields[4];
+ var rng = new Random();
+ percentChange = (rng.nextDouble() * 20) - 10;
}
}
« no previous file with comments | « no previous file | sky/examples/stocks/stock.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698