Skip to content

Commit

Permalink
Merge pull request #1308 from vincentljn/tooltip-activation-prop
Browse files Browse the repository at this point in the history
Add explicit prop to activate tooltip
  • Loading branch information
xile611 committed Jul 5, 2018
2 parents 8604a4e + 2483f2a commit 8452047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chart/generateCategoricalChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const generateCategoricalChart = ({
* @return {Object} Whole new state
*/
static createDefaultState = (props) => {
const { children } = props;
const { children, isTooltipActive } = props;
const brushItem = findChildByType(children, Brush);
const startIndex = (brushItem && brushItem.props && brushItem.props.startIndex) || 0;
const endIndex = (brushItem && brushItem.props && brushItem.props.endIndex)
Expand All @@ -107,7 +107,7 @@ const generateCategoricalChart = ({
dataStartIndex: startIndex,
dataEndIndex: endIndex,
activeTooltipIndex: -1,
isTooltipActive: false,
isTooltipActive: isTooltipActive || false,
};
};

Expand Down

0 comments on commit 8452047

Please sign in to comment.