put the aggConfig on the points in series data

Use attached aggConfig to determine the correct agg to create a filter from
This commit is contained in:
Joe Fleming 2015-09-18 11:06:41 -07:00
parent 5cc4ad58fa
commit 619730298b
4 changed files with 6 additions and 3 deletions

View file

@ -16,7 +16,7 @@ define(function () {
}
/**
* Returns an array of the aggConfigResult and parents up te branch
* Returns an array of the aggConfigResult and parents up the branch
* @returns {array} Array of aggConfigResults
*/
AggConfigResult.prototype.getPath = function () {

View file

@ -26,6 +26,7 @@ define(function (require) {
}
if (series) {
point.aggConfig = series.agg;
point.series = series.agg.fieldFormatter()(unwrap(row[series.i]));
}

View file

@ -12,7 +12,6 @@ define(function (require) {
var series = _(rows)
.transform(function (series, row) {
if (!multiY) {
var point = partGetPoint(row, aspects.y, aspects.z);
if (point) addToSiri(series, point, point.series);

View file

@ -36,7 +36,10 @@ define(function (require) {
// For legend clicks, use the last bucket in the path
if (isLegendLabel) {
aggBuckets = _.slice(aggBuckets, aggBuckets.length - 1);
// series data has multiple values, use aggConfig on the first
// hierarchical data values is an object with the addConfig
var value = _.isArray(event.point.values) ? event.point.values[0] : event.point.values;
aggBuckets = aggBuckets.filter(result => result.aggConfig === value.aggConfig);
}
var filters = _(aggBuckets)