新闻趋势分析:排序和绘图
//Sort Arrays
function sort_categories_array(){
for(var i=0;i
return 1;
}else{
return 0;
}
}
//Draw Figures
var canvas_width=420;
var canvas_height=400;
var column_width=(canvas_width-(columns-1)*20)/columns;
var row_height=canvas_height/max_rows;
var draw_offset=row_height*(max_rows-rows)/2;
/*
min_doc_num ~ (row_height-2)/2;
max_doc_num ~ (row_height-2);
(max-doc_num)/(max-min)=(row_height-2-x)/((row_height-2)/2);
doc_mun ~ (row_height-2)*(max+doc_num-2*min)/(2*(max-min));
*/
var thickness=(row_height-2)*(max+doc_num-2*min)/(2*(max-min));
//New Thickness
var thickness=(row_height-2)*doc_num/max;
if(thickness<2)
thickness=2;
//Load External Vars
//Show Errors and Warnning
//Add ID attribute
//Canvas size and valid canvas size
/*
valid_canvas_size=260*200;
canvas_size=300*280;
valid_canvas_size=420*400;
canvas_size=460*480;
So,
valid_canvas_width=canvas_width-40;
valid_canvas_height=canvas_height-80;
Typical Canvas Size:
300*280;
300*460;
*/
- Flash 数组排序方法介绍
- 昨晚部分大学同学聚餐记