Skip to content

Commit

Permalink
refactor: add comments and remove unnecessary type
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Apr 10, 2019
1 parent 4c155fa commit 8e0bfe7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/series/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ export function renderBars(
const barGeometries: BarGeometry[] = [];
dataset.forEach((datum) => {
const { y0, y1, initialY1 } = datum;
// don't create a bar if the initialY1 value is null.
if (initialY1 === null) {
return;
}
// don't create a bar if the x value is not part of the ordinal scale
if (xScaleType === ScaleType.Ordinal && !xDomain.includes(datum.x)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/series/series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export function formatStackedDataSeriesValues(
dataseries: RawDataSeries[],
scaleToExtent: boolean,
): DataSeries[] {
const yValueStackMap: Map<any, number[]> = getYValueStackMap(dataseries);
const yValueStackMap = getYValueStackMap(dataseries);

const stackedValues = computeYStackedMapValues(yValueStackMap, scaleToExtent);

Expand Down

0 comments on commit 8e0bfe7

Please sign in to comment.