diff --git a/var/www/Flask_server.py b/var/www/Flask_server.py
index 4a8cbb1a..3f434067 100755
--- a/var/www/Flask_server.py
+++ b/var/www/Flask_server.py
@@ -509,7 +509,7 @@ def sentiment_analysis_getplotdata():
dateStart_timestamp = calendar.timegm(dateStart.timetuple())
to_return = {}
- range_providers = r_serv_charts.zrangebyscore('providers_set_'+ get_date_range(1)[1], '-inf', '+inf', start=0, num=8)
+ range_providers = r_serv_charts.zrangebyscore('providers_set_'+ get_date_range(0)[0], '-inf', '+inf', start=0, num=8)
if range_providers == []:
print 'today provider empty'
range_providers = r_serv_charts.smembers('all_provider_set')
diff --git a/var/www/static/js/sentiment_trending.js b/var/www/static/js/sentiment_trending.js
index 1d69f6ed..2caf91d4 100644
--- a/var/www/static/js/sentiment_trending.js
+++ b/var/www/static/js/sentiment_trending.js
@@ -42,7 +42,6 @@
$.getJSON("/sentiment_analysis_getplotdata/",
function(data) {
- console.log(data);
var all_data = [];
var plot_data = [];
var graph_avg = [];
@@ -120,6 +119,8 @@ $.getJSON("/sentiment_analysis_getplotdata/",
all_graph_hour_maxVal = Math.abs(hour_sum) > all_graph_hour_maxVal ? Math.abs(hour_sum) : all_graph_hour_maxVal;
var curr_avg = curr_sum / (curr_sum_elem);
+ if(isNaN(curr_avg))
+ curr_avg = 0.0
//var curr_avg = curr_sum / (oneWeek/oneHour);
//var curr_avg = curr_sum / (spark_data.length);
graph_avg.push([curr_provider, curr_avg]);
@@ -134,6 +135,7 @@ $.getJSON("/sentiment_analysis_getplotdata/",
// print week
var num = graphNum + 1;
var placeholder = '.sparkLineStatsWeek' + num;
+ sparklineOptions.barWidth = 2;
$(placeholder).sparkline(plot_data[graphNum], sparklineOptions);
$(placeholder+'t').text(curr_provider);
var curr_avg_text = isNaN(curr_avg) ? "No data" : curr_avg.toFixed(5);
@@ -143,7 +145,6 @@ $.getJSON("/sentiment_analysis_getplotdata/",
sparklineOptions.tooltipFormat = '● Avg: {{value}} '
$(placeholder+'b').sparkline([curr_avg], sparklineOptions);
sparklineOptions.tooltipFormat = '● {{offset:names}}, {{value}} '
- sparklineOptions.barWidth = 2;
sparklineOptions.tooltipValueLookups = { names: offset_to_time};
sparklineOptions.chartRangeMax = max_value_day;
@@ -180,7 +181,6 @@ $.getJSON("/sentiment_analysis_getplotdata/",
all_day_avg_maxVal = Math.abs(day_avg) > all_day_avg_maxVal ? Math.abs(day_avg) : all_day_avg_maxVal;
$(placeholder+'b').sparkline([day_avg], sparklineOptions);
sparklineOptions.tooltipFormat = '● {{offset:names}}, {{value}} '
- sparklineOptions.barWidth = 2;
$(placeholder+'s').text(day_avg_text);
avgName = ".pannelToday" + num;
diff --git a/var/www/templates/sentiment_analysis_trending.html b/var/www/templates/sentiment_analysis_trending.html
index 89b4f675..3a927251 100644
--- a/var/www/templates/sentiment_analysis_trending.html
+++ b/var/www/templates/sentiment_analysis_trending.html
@@ -21,12 +21,12 @@
.moodtable_worst {
background: rgba(255, 0, 0, 0.47);
- font-size: unset;
+ font-size: small;
}
.moodtable_best {
background: rgba(132, 255, 0, 0.5);
- font-size: unset;
+ font-size: small;
}
.jqstooltip{