diff options
author | bob <bcz@cs.brown.edu> | 2019-05-14 18:59:32 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-14 18:59:32 -0400 |
commit | 281bfa589bd1ca66823003ca91cc11ce895fe5e2 (patch) | |
tree | 9380004d6bd4b7f8c6dbd497b9100b4142b869e4 /src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts | |
parent | 39e0f933fc446e70ae14006f8d9952822d798fe3 (diff) |
fixes for northstar
Diffstat (limited to 'src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts')
-rw-r--r-- | src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts b/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts index 6291ec1fc..3e9145a1b 100644 --- a/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts +++ b/src/client/northstar/dash-nodes/HistogramBinPrimitiveCollection.ts @@ -198,8 +198,8 @@ export class HistogramBinPrimitiveCollection { var marginParams = new MarginAggregateParameters(); marginParams.aggregateFunction = axis.AggregateFunction; var marginAggregateKey = ModelHelpers.CreateAggregateKey(this.histoOp.Schema!.distinctAttributeParameters, axis, this.histoResult, brush.brushIndex!, marginParams); - var marginResult = ModelHelpers.GetAggregateResult(bin, marginAggregateKey) as MarginAggregateResult; - return !marginResult ? 0 : marginResult.absolutMargin!; + let aggResult = ModelHelpers.GetAggregateResult(bin, marginAggregateKey); + return aggResult instanceof MarginAggregateResult && aggResult.absolutMargin ? aggResult.absolutMargin : 0; } private createBinPrimitive(barAxis: number, brush: Brush, marginRect: PIXIRectangle, |