Skip to content

Commit

Permalink
Histogram problems fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuznietsov committed Oct 27, 2022
1 parent 70f0fd0 commit 87042ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ export const convertToRangeParams = (
return {
type: RANGE_MODES.Histogram,
maxBars: aggParams.maxBars ?? 'auto',
ranges: [],
includeEmptyRows: aggParams.min_doc_count,
};
} else {
return {
type: RANGE_MODES.Range,
maxBars: 'auto',
ranges:
aggParams.ranges?.map((range) => ({
label: range.label,
from: range.from ?? null,
to: range.to ?? null,
})) ?? [],
ranges: aggParams.ranges?.map((range) => ({
label: range.label,
from: range.from ?? null,
to: range.to ?? null,
})),
};
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ interface Range {
export interface RangeParams extends FormatParams {
type: RangeMode;
maxBars: 'auto' | number;
ranges: Range[];
ranges?: Range[];
includeEmptyRows?: boolean;
parentFormat?: {
id: string;
Expand Down

0 comments on commit 87042ff

Please sign in to comment.