Skip to content

Commit

Permalink
NumberColumn.getValueFromKey() now supports IQualifiedKey as a
Browse files Browse the repository at this point in the history
requested dataType and provides appropriate String values for
ambiguous aggregated data.
  • Loading branch information
adufilie committed Sep 15, 2014
1 parent a3b080b commit 29ae46a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions WeaveData/src/weave/data/AttributeColumns/NumberColumn.as
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,21 @@ package weave.data.AttributeColumns
{
var number:Number = getValueFromKey(key, Number);
if (numberToStringFunction != null)
{
return StandardLib.asString(numberToStringFunction(number, array));
}
if (isNaN(number) && array && array.length > 1)
{
var aggregation:String = (_metadata && _metadata[ColumnMetadata.AGGREGATION]) as String || Aggregation.DEFAULT;
if (aggregation == Aggregation.SAME)
return StringColumn.AMBIGUOUS_DATA;
}
return StandardLib.formatNumber(number);
}

if (dataType === IQualifiedKey)
return WeaveAPI.QKeyManager.getQKey(DataType.NUMBER, getValueFromKey(key, Number));

return null;
}

Expand Down

0 comments on commit 29ae46a

Please sign in to comment.