Skip to content

Commit

Permalink
Merge pull request #1202 from scottdickerson/master
Browse files Browse the repository at this point in the history
fix(bar): Bar chart is missing bar for the first value
  • Loading branch information
boygirl authored Dec 14, 2018
2 parents 1c266b4 + 144ebe1 commit 9a72c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/victory-bar/src/helper-methods.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assign } from "lodash";
import { assign, isNil } from "lodash";
import { Helpers, LabelHelpers, Data, Domain, Scale } from "victory-core";

const getBarPosition = (props, datum) => {
Expand Down Expand Up @@ -48,7 +48,7 @@ const getBaseProps = (props, fallbackProps) => {
} };

return data.reduce((childProps, datum, index) => {
const eventKey = datum.eventKey || index;
const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
const { x, y, y0, x0 } = getBarPosition(props, datum);
const dataProps = {
alignment, barRatio, cornerRadius, data, datum, horizontal, index, polar, origin,
Expand Down

0 comments on commit 9a72c95

Please sign in to comment.