mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
fix the shift and width of stat highchart
This commit is contained in:
parent
17c5d1e32a
commit
73da4828b1
2 changed files with 8 additions and 2 deletions
|
@ -82,3 +82,7 @@ tr.new-row {
|
|||
color: #3c763d;
|
||||
background-color: #dff0d8;
|
||||
}
|
||||
|
||||
.highchart-modal .modal-dialog {
|
||||
width: 650px;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ $(document).ready(function(){
|
|||
// get the last value using underscore-keypath
|
||||
var y = _(json).valueForKeyPath(graphKeypath);
|
||||
|
||||
var shift = currentHighchart.series[0].length > 20;
|
||||
// start shifting the chart once we hit 20 data points
|
||||
var shift = currentHighchart.series[0].data.length > 20;
|
||||
currentHighchart.series[0].addPoint([x, y], true, shift);
|
||||
}
|
||||
}).fail(function(data) {
|
||||
|
@ -58,7 +59,8 @@ $(document).ready(function(){
|
|||
bootbox.dialog({
|
||||
title: graphKeypath,
|
||||
message: "<div id='highchart-container'></div>",
|
||||
buttons: {}
|
||||
buttons: {},
|
||||
className: 'highchart-modal'
|
||||
});
|
||||
|
||||
currentHighchart = new Highcharts.Chart({
|
||||
|
|
Loading…
Reference in a new issue