Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip with StackedBar not being rendered #150

Open
juanpaucar opened this issue Dec 11, 2018 · 10 comments
Open

Tooltip with StackedBar not being rendered #150

juanpaucar opened this issue Dec 11, 2018 · 10 comments
Assignees
Labels

Comments

@juanpaucar
Copy link

Expected Behavior

When I add a Tooltip for a StackedBar, I expect the tooltip being rendered along with the chart. This is also happening to me on Bar charts.

Current Behavior

The tooltip is not being rendered. I created a small pen to show you the behavior. I started from a similar pen which worked for Line charts.

The chart is being rendered, but the tooltip is not being rendered.

Possible Solution

Not sure, if it's not implemented yet or if it should be rendered but I'm missing something. I thought that the tooltip worked since on the documentation there's this mention:

The tooltip component is a great companion to the line, stacked area, stacked bar and grouped bar charts.

Steps to Reproduce (for bugs)

Please, check this pen: https://codepen.io/juanpaucar/pen/maJrgQ

Screenshots (if appropriate):

Context

I just started using this charts and it seemed weird to me that they don't work for Bar and Stacked Bar.

Your Environment

Ubuntu 18.04
Node 10.13.0
Britecharts and Britecharts-react latests versions
https://codepen.io/juanpaucar/pen/maJrgQ

@Golodhros
Copy link
Collaborator

Hi @juanpaucar, thanks for opening this issue!

I just noticed we don't have an example of this in the docs. In theory, it should work but I don't discard there is an issue somewhere.

I will try to work it out in the demos and then come back to you here.

Thanks again!

@miglesiasEB miglesiasEB self-assigned this Dec 12, 2018
@juanpaucar
Copy link
Author

Hi, thank you guys for the wrapper and the library itself. I thought I was doing something wrong... or am I 🤔

@davegomez
Copy link
Contributor

I can confirm that the tooltip is not being rendered with the StackedBar chart and is not throwing any error either. Gonna take a look.

@davegomez
Copy link
Contributor

@Golodhros this should be mark as a bug.

I've been playing with the charts and found that GroupedBar and StackedBar are not calling componentDidUpdate after the initial render, so the method createTooltip is never called for these charts.

@Golodhros
Copy link
Collaborator

Thanks for the debugging @davegomez!!

@miglesiasEB miglesiasEB added bug and removed question labels Dec 16, 2018
@Dezzymei
Copy link

Is there a way to do this then? I might look for a different solution if this library is not complete...

@davegomez
Copy link
Contributor

This is already fixed in the PR #163

@Golodhros
Copy link
Collaborator

It seems we still have some issues. If you check on https://eventbrite.github.io/britecharts-react/#!/StackedBar/5, the tooltip only shows when we are hovering outside the stacked bars.

@davegomez
Copy link
Contributor

davegomez commented Jul 18, 2019

This is a good case for "it was working for me"... gonna take a look on that today. Thanks for the demo 🙂 @Golodhros

@Golodhros
Copy link
Collaborator

Thanks a lot @davegomez! You are really making a dent in Britecharts-React!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants