|
@ -441,26 +441,21 @@ LineGraph.prototype._updateAllGroupData = function () { |
|
|
* @protected |
|
|
* @protected |
|
|
*/ |
|
|
*/ |
|
|
LineGraph.prototype._updateUngrouped = function() { |
|
|
LineGraph.prototype._updateUngrouped = function() { |
|
|
if (this.itemsData != null) { |
|
|
|
|
|
// var t0 = new Date();
|
|
|
|
|
|
var group = {id: UNGROUPED, content: this.options.defaultGroup}; |
|
|
|
|
|
this._updateGroup(group, UNGROUPED); |
|
|
|
|
|
|
|
|
if (this.itemsData && this.itemsData != null) { |
|
|
var ungroupedCounter = 0; |
|
|
var ungroupedCounter = 0; |
|
|
if (this.itemsData) { |
|
|
|
|
|
for (var itemId in this.itemsData._data) { |
|
|
|
|
|
if (this.itemsData._data.hasOwnProperty(itemId)) { |
|
|
|
|
|
var item = this.itemsData._data[itemId]; |
|
|
|
|
|
if (item != undefined) { |
|
|
|
|
|
if (item.hasOwnProperty('group')) { |
|
|
|
|
|
if (item.group === undefined) { |
|
|
|
|
|
item.group = UNGROUPED; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
|
|
|
for (var itemId in this.itemsData._data) { |
|
|
|
|
|
if (this.itemsData._data.hasOwnProperty(itemId)) { |
|
|
|
|
|
var item = this.itemsData._data[itemId]; |
|
|
|
|
|
if (item != undefined) { |
|
|
|
|
|
if (item.hasOwnProperty('group')) { |
|
|
|
|
|
if (item.group === undefined) { |
|
|
item.group = UNGROUPED; |
|
|
item.group = UNGROUPED; |
|
|
} |
|
|
} |
|
|
ungroupedCounter = item.group == UNGROUPED ? ungroupedCounter + 1 : ungroupedCounter; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
item.group = UNGROUPED; |
|
|
|
|
|
} |
|
|
|
|
|
ungroupedCounter = item.group == UNGROUPED ? ungroupedCounter + 1 : ungroupedCounter; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -472,6 +467,10 @@ LineGraph.prototype._updateUngrouped = function() { |
|
|
this.yAxisLeft.removeGroup(UNGROUPED); |
|
|
this.yAxisLeft.removeGroup(UNGROUPED); |
|
|
this.yAxisRight.removeGroup(UNGROUPED); |
|
|
this.yAxisRight.removeGroup(UNGROUPED); |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
var group = {id: UNGROUPED, content: this.options.defaultGroup}; |
|
|
|
|
|
this._updateGroup(group, UNGROUPED); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
delete this.groups[UNGROUPED]; |
|
|
delete this.groups[UNGROUPED]; |
|
|