Closes #5323. Fixes issue when splitting charts on a date field. The issue involved the _normalizeOrdered function not being able to access the ordered object when data objects were nested in rows or columns.
This commit is contained in:
parent
c9d06d521d
commit
f316300ae8
|
@ -668,16 +668,21 @@ define(function (require) {
|
|||
* @return {undefined}
|
||||
*/
|
||||
Data.prototype._normalizeOrdered = function () {
|
||||
if (!this.data.ordered || !this.data.ordered.date) return;
|
||||
var data = this.getVisData();
|
||||
var self = this;
|
||||
|
||||
var missingMin = this.data.ordered.min == null;
|
||||
var missingMax = this.data.ordered.max == null;
|
||||
data.forEach(function (d) {
|
||||
if (!d.ordered || !d.ordered.date) return;
|
||||
|
||||
if (missingMax || missingMin) {
|
||||
var extent = d3.extent(this.xValues());
|
||||
if (missingMin) this.data.ordered.min = extent[0];
|
||||
if (missingMax) this.data.ordered.max = extent[1];
|
||||
}
|
||||
var missingMin = d.ordered.min == null;
|
||||
var missingMax = d.ordered.max == null;
|
||||
|
||||
if (missingMax || missingMin) {
|
||||
var extent = d3.extent(self.xValues());
|
||||
if (missingMin) d.ordered.min = extent[0];
|
||||
if (missingMax) d.ordered.max = extent[1];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue