From ebcf945e46dfc2675a52a288de52c2127c6c7b30 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Jan 2019 16:44:05 +0800 Subject: [PATCH] . --- chapter2/mysite/myapp/static/scripts/trend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter2/mysite/myapp/static/scripts/trend.js b/chapter2/mysite/myapp/static/scripts/trend.js index 9a8fb76..012f81b 100755 --- a/chapter2/mysite/myapp/static/scripts/trend.js +++ b/chapter2/mysite/myapp/static/scripts/trend.js @@ -229,7 +229,7 @@ $(function(){ var data = top10_sells[key]; histogramChart3_names.push(data['product_name']); histogramChart3_datas.push(data['good_c']); - var rate = base['good_c'] * 100 / data['good_c']; + var rate = data['good_c'] * 100 / base['good_c']; histogramChart3_rates.push(rate.toFixed(0)); }