Merge branch 'users' into trendings

pull/9/head
Sami Mokaddem 2017-11-16 15:11:04 +01:00
commit 5779eb53c4
1 changed files with 6 additions and 3 deletions

View File

@ -44,8 +44,9 @@ function updateDatePieOrg() {
if (toPlot.length == 0) {
toPlot = [{ label: 'No data', data: 100 }];
}
if (!pieOrgWidget === undefined) {
if (!(pieOrgWidget === undefined)) {
pieOrgWidget.setData(toPlot);
pieOrgWidget.setupGrid();
pieOrgWidget.draw();
} else {
pieOrgWidget = $.plot('#pieOrg', toPlot, {
@ -70,8 +71,9 @@ function updateDatePieApi() {
toPlot = [{ label: 'No data', data: 100 }];
}
if (!pieApiWidget === undefined) {
if (!(pieApiWidget === undefined)) {
pieApiWidget.setData(toPlot);
pieApiWidget.setupGrid();
pieApiWidget.draw();
} else {
pieApiWidget = $.plot('#pieApi', toPlot, {
@ -100,8 +102,9 @@ function updateDateOvertime() {
temp.push([new Date(item[0]*1000), item[1]]);
}
data = {label: 'Login overtime', data: temp}
if (!overtimeWidget === undefined) {
if (!(overtimeWidget === undefined)) {
overtimeWidget.setData(toPlot);
overtimeWidget.setupGrid();
overtimeWidget.draw();
} else {
overtimeWidget = $.plot('#lineChart', [data], {