mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
Added avg text in sentiment-trending + fixed date range bug
This commit is contained in:
parent
cdd08d7df0
commit
bb677b9061
2 changed files with 12 additions and 3 deletions
|
@ -101,22 +101,23 @@ $.getJSON("/sentiment_analysis_getplotdata/",
|
|||
$(placeholder+'t').text(curr_provider);
|
||||
$(placeholder+'s').text(curr_avg.toFixed(5));
|
||||
|
||||
sparklineOptions.barWidth = 7;
|
||||
sparklineOptions.barWidth = 18;
|
||||
$(placeholder+'b').sparkline([curr_avg], sparklineOptions);
|
||||
sparklineOptions.barWidth = 2;
|
||||
|
||||
// print today
|
||||
var data_length = plot_data[graphNum].length;
|
||||
var data_today = plot_data[graphNum].slice(data_length-24*2, data_length-24*1);
|
||||
var data_today = plot_data[graphNum].slice(data_length-24, data_length-1);
|
||||
|
||||
placeholder = '.sparkLineStatsToday' + num;
|
||||
sparklineOptions.barWidth = 14;
|
||||
$(placeholder).sparkline(data_today, sparklineOptions);
|
||||
$(placeholder+'t').text(curr_provider);
|
||||
|
||||
sparklineOptions.barWidth = 7;
|
||||
sparklineOptions.barWidth = 18;
|
||||
$(placeholder+'b').sparkline([day_sum/24], sparklineOptions);
|
||||
sparklineOptions.barWidth = 2;
|
||||
$(placeholder+'s').text((day_sum/24).toFixed(5));
|
||||
|
||||
}//for loop
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday1t">Graph 1</strong>
|
||||
<strong class="sparkLineStatsToday1s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -136,6 +137,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday2t">Graph 2</strong>
|
||||
<strong class="sparkLineStatsToday2s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -151,6 +153,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday3t">Graph 3</strong>
|
||||
<strong class="sparkLineStatsToday3s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -166,6 +169,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday4t">Graph 4</strong>
|
||||
<strong class="sparkLineStatsToday4s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -185,6 +189,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday5t">Graph 5</strong>
|
||||
<strong class="sparkLineStatsToday5s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -200,6 +205,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday6t">Graph 6</strong>
|
||||
<strong class="sparkLineStatsToday6s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -215,6 +221,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday7t">Graph 7</strong>
|
||||
<strong class="sparkLineStatsToday7s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
@ -230,6 +237,7 @@
|
|||
<div id="panel-today" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong class="sparkLineStatsToday8t">Graph 8</strong>
|
||||
<strong class="sparkLineStatsToday8s pull-right">Avg</strong>
|
||||
</div>
|
||||
<div class="panel-body panelInside">
|
||||
<table class="table">
|
||||
|
|
Loading…
Reference in a new issue