Skip to content

Commit

Permalink
fix: for multiple layers
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Mar 31, 2020
1 parent b5a6d39 commit 766d07f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ export function XYChart({
const xTitle = (xAxisColumn && xAxisColumn.name) || args.xTitle;

// add minInterval only for single row value as it cannot be determined from dataset
const minInterval =
data.tables[layers[0].layerId].rows.length === 1
? parseInterval(xAxisColumn?.meta?.aggConfigParams?.interval)?.asMilliseconds()
: undefined;

const minInterval = layers.every(layer => data.tables[layer.layerId].rows.length <= 1)
? parseInterval(xAxisColumn?.meta?.aggConfigParams?.interval)?.asMilliseconds()
: undefined;

const xDomain =
data.dateRange && layers.every(l => l.xScaleType === 'time')
Expand Down

0 comments on commit 766d07f

Please sign in to comment.