mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:23:35 +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;
|
color: #3c763d;
|
||||||
background-color: #dff0d8;
|
background-color: #dff0d8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.highchart-modal .modal-dialog {
|
||||||
|
width: 650px;
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@ $(document).ready(function(){
|
||||||
// get the last value using underscore-keypath
|
// get the last value using underscore-keypath
|
||||||
var y = _(json).valueForKeyPath(graphKeypath);
|
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);
|
currentHighchart.series[0].addPoint([x, y], true, shift);
|
||||||
}
|
}
|
||||||
}).fail(function(data) {
|
}).fail(function(data) {
|
||||||
|
@ -58,7 +59,8 @@ $(document).ready(function(){
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
title: graphKeypath,
|
title: graphKeypath,
|
||||||
message: "<div id='highchart-container'></div>",
|
message: "<div id='highchart-container'></div>",
|
||||||
buttons: {}
|
buttons: {},
|
||||||
|
className: 'highchart-modal'
|
||||||
});
|
});
|
||||||
|
|
||||||
currentHighchart = new Highcharts.Chart({
|
currentHighchart = new Highcharts.Chart({
|
||||||
|
|
Loading…
Reference in a new issue