From 1ca8cf69f6b71f55f40896517199a1c3fc7923e1 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Wed, 10 Aug 2016 09:38:15 +0200 Subject: [PATCH] Added trendingchart.js --- var/www/static/js/trendingchart.js | 72 ++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 var/www/static/js/trendingchart.js 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