This commit is contained in:
guange 2019-01-18 17:00:34 +08:00
parent d18c6ef914
commit c6a5fd4aa8
1 changed files with 6 additions and 6 deletions

View File

@ -237,12 +237,12 @@ $(function(){
var histogramChart3_datas =[]; var histogramChart3_datas =[];
var histogramChart3_rates =[]; var histogramChart3_rates =[];
for(var key in top10_sells){ for(var key in top10_sells){
var base = top10_sells[0]; var base = top10_sells[0];
var data = top10_sells[key]; var data = top10_sells[key];
histogramChart3_names.push(data['product_name'].substring(0,10)); histogramChart3_names.push(data['product_name'].substring(0,20));
histogramChart3_datas.push(data['good_c']); histogramChart3_datas.push(data['good_c']);
var rate = data['good_c'] * 100 / base['good_c']; var rate = data['good_c'] * 100 / base['good_c'];
histogramChart3_rates.push(rate.toFixed(0)); histogramChart3_rates.push(rate.toFixed(0));
} }