From 8fa3c2b147236c88348f52a59f3a89eeb844a843 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Tue, 16 Aug 2016 10:49:05 +0200 Subject: [PATCH] Added stacked choice or not for plot-tool (sentiments) --- var/www/static/js/sentiment_plot.js | 9 ++++----- var/www/templates/sentiment_analysis_plot_tool.html | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/var/www/static/js/sentiment_plot.js b/var/www/static/js/sentiment_plot.js index c9c2b7ef..b8541247 100644 --- a/var/www/static/js/sentiment_plot.js +++ b/var/www/static/js/sentiment_plot.js @@ -31,13 +31,12 @@ $( "#amount" ).val( new Date($( ".sliderRange" ).slider( "values", 0 )).toLocale $('#plot_btn').click(plotData); - /* Plot the requested data (if available) stored in slider and checkboxes */ - function plotData(){ + var graph_options = { series: { - stack: true, + stack: $('#checkbox_stacked').prop('checked'), lines: { show: false, lineWidth: 2, fill: true, fillColor: { colors: [ { opacity: 0.5 }, { opacity: 0.2 } ] } @@ -60,8 +59,8 @@ function plotData(){ autoscaleMargin: 0.1, }, } - var query = $( "input:checked" ).map(function () {return this.value;}).get().join(","); - var Qdate = new Date($( ".sliderRange" ).slider( "values", 0 )).toLocaleDateString() +'-'+ new Date($( ".sliderRange" ).slider( "values", 1 )).toLocaleDateString() + var query = $( "input:checked[value]" ).map(function () {return this.value;}).get().join(","); + var Qdate = new Date($( ".sliderRange" ).slider( "values", 0 )).toLocaleDateString() +'-'+ new Date($( ".sliderRange" ).slider( "values", 1 )).toLocaleDateString(); // retreive the data from the server diff --git a/var/www/templates/sentiment_analysis_plot_tool.html b/var/www/templates/sentiment_analysis_plot_tool.html index 713d0f71..a5a69b18 100644 --- a/var/www/templates/sentiment_analysis_plot_tool.html +++ b/var/www/templates/sentiment_analysis_plot_tool.html @@ -96,7 +96,8 @@
- + +