diff --git a/var/www/static/js/trendingchart.js b/var/www/static/js/trendingchart.js new file mode 100644 index 00000000..0afda40b --- /dev/null +++ b/var/www/static/js/trendingchart.js @@ -0,0 +1,72 @@ + +/* Already defined variable (Before the input) +* +* var chart_1_num_day = 5; +* var chart_2_num_day = 15; +* +*/ + +function plot_top_graph(trendingName){ + /**** Flot Pie Chart ****/ + var options = { + series: { pie: { show: true } }, + grid: { hoverable: true, clickable: true }, + legend: { show: false } + }; + + + // Graph1 + $.getJSON($SCRIPT_ROOT+"/_progressionCharts?trendingName="+trendingName+"&num_day="+chart_1_num_day, + function(data) { + temp_data_pie = []; + for(i=0; i