mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
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:
parent
5cc4ad58fa
commit
619730298b
4 changed files with 6 additions and 3 deletions
|
@ -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 () {
|
||||
|
|
|
@ -26,6 +26,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
if (series) {
|
||||
point.aggConfig = series.agg;
|
||||
point.series = series.agg.fieldFormatter()(unwrap(row[series.i]));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue