mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
Added stacked choice or not for plot-tool (sentiments)
This commit is contained in:
parent
4baac0b994
commit
8fa3c2b147
2 changed files with 6 additions and 6 deletions
|
@ -31,13 +31,12 @@ $( "#amount" ).val( new Date($( ".sliderRange" ).slider( "values", 0 )).toLocale
|
||||||
|
|
||||||
$('#plot_btn').click(plotData);
|
$('#plot_btn').click(plotData);
|
||||||
|
|
||||||
|
|
||||||
/* Plot the requested data (if available) stored in slider and checkboxes */
|
/* Plot the requested data (if available) stored in slider and checkboxes */
|
||||||
|
|
||||||
function plotData(){
|
function plotData(){
|
||||||
|
|
||||||
var graph_options = {
|
var graph_options = {
|
||||||
series: {
|
series: {
|
||||||
stack: true,
|
stack: $('#checkbox_stacked').prop('checked'),
|
||||||
lines: { show: false,
|
lines: { show: false,
|
||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
fill: true, fillColor: { colors: [ { opacity: 0.5 }, { opacity: 0.2 } ] }
|
fill: true, fillColor: { colors: [ { opacity: 0.5 }, { opacity: 0.2 } ] }
|
||||||
|
@ -60,8 +59,8 @@ function plotData(){
|
||||||
autoscaleMargin: 0.1,
|
autoscaleMargin: 0.1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
var query = $( "input:checked" ).map(function () {return this.value;}).get().join(",");
|
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()
|
var Qdate = new Date($( ".sliderRange" ).slider( "values", 0 )).toLocaleDateString() +'-'+ new Date($( ".sliderRange" ).slider( "values", 1 )).toLocaleDateString();
|
||||||
|
|
||||||
|
|
||||||
// retreive the data from the server
|
// retreive the data from the server
|
||||||
|
|
|
@ -96,7 +96,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
<div class="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>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.panel-body -->
|
<!-- /.panel-body -->
|
||||||
|
|
Loading…
Reference in a new issue