Added stacked choice or not for plot-tool (sentiments)

This commit is contained in:
Mokaddem 2016-08-16 10:49:05 +02:00
parent 4baac0b994
commit 8fa3c2b147
2 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -96,7 +96,8 @@
</div>
<!-- /.row -->
<div class="row">
<button id="plot_btn" class="btn btn-info" style="margin-right: 8px; float: right;">Plot!</button>
<button id="plot_btn" class="btn btn-info" style="margin-right: 8px; margin-left: 8px;float: right;">Plot!</button>
<label style="float: right;"><input id="checkbox_stacked" type="checkbox" checked=true> Stacked graph?</label>
</div>
</div>
<!-- /.panel-body -->