Recharts: Tooltip "active" prop being overwritten

Created on 19 Jul 2017  路  3Comments  路  Source: recharts/recharts

I'm running into an issue where the active and payload props for a Tooltip are being overwritten. Code:

<ResponsiveContainer
          width="100%"
          height={this.props.height}
        >
          <PieChart
            width={diameter}
            height={diameter}
          >
            <Pie
              data={this.props.data}
              dataKey="value"
            >
            </Pie>
            <Tooltip
              active={true}
              payload={this.props.payload}
            />
          </PieChart>
</ResponsiveContainer>

The active prop is false when I inspect the tooltip with React dev tools. And they payload never changes, although this.props.payload changes.

What controls the tooltip, and is there a way to control it manually?

Most helpful comment

Hi. Actually, this problem still remains:

The active prop is false when I inspect the tooltip with React dev tools. And they payload never changes, although this.props.payload changes.

But I somehow managed to make it permanently visible by using this styles prop:

wrapperStyle={{
  visibility: 'visible',
}}

However, the whole chart still listening each mouse over and repaints Tooltip, even though it's fixed by style.

Maybe it will be useful for someone.

@GiancarlosIO @alexandersoto

All 3 comments

Same here :(

Hi. Actually, this problem still remains:

The active prop is false when I inspect the tooltip with React dev tools. And they payload never changes, although this.props.payload changes.

But I somehow managed to make it permanently visible by using this styles prop:

wrapperStyle={{
  visibility: 'visible',
}}

However, the whole chart still listening each mouse over and repaints Tooltip, even though it's fixed by style.

Maybe it will be useful for someone.

@GiancarlosIO @alexandersoto

Duplicated with #791

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abhayjeetgupta picture abhayjeetgupta  路  3Comments

Eric24 picture Eric24  路  3Comments

sortsen picture sortsen  路  3Comments

patrick-lewandowski picture patrick-lewandowski  路  3Comments

gutakk picture gutakk  路  3Comments