diff --git a/chapter2/mysite/myapp/static/scripts/trend.js b/chapter2/mysite/myapp/static/scripts/trend.js index 55c61d5..1dd5fe4 100755 --- a/chapter2/mysite/myapp/static/scripts/trend.js +++ b/chapter2/mysite/myapp/static/scripts/trend.js @@ -239,7 +239,7 @@ $(function(){ for(var key in top10_sells){ var base = top10_sells[0]; var data = top10_sells[key]; - histogramChart3_names.push(data['product_name'].substring(0,20)); + histogramChart3_names.push(data['product_name'].substring(0,15)); histogramChart3_datas.push(data['good_c']); var rate = data['good_c'] * 100 / base['good_c']; histogramChart3_rates.push(rate.toFixed(0));