From 83c2fd9ea3dd6ff7f844203b867396af9b3fc7ac Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Jan 2019 16:33:31 +0800 Subject: [PATCH] . --- chapter2/mysite/myapp/static/scripts/trend.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chapter2/mysite/myapp/static/scripts/trend.js b/chapter2/mysite/myapp/static/scripts/trend.js index f0de9ea..b329dcb 100755 --- a/chapter2/mysite/myapp/static/scripts/trend.js +++ b/chapter2/mysite/myapp/static/scripts/trend.js @@ -224,8 +224,9 @@ $(function(){ var histogramChart3_names = []; var histogramChart3_datas =[]; for(var key in top10_sells){ - histogramChart3_names.push(key['product_name']); - histogramChart3_datas.push(key['good_c']); + var data = top10_sells[key]; + histogramChart3_names.push(data['product_name']); + histogramChart3_datas.push(data['good_c']); }