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 for only first stack bar? #136

Open
vishaltanwar opened this issue Jul 16, 2012 · 12 comments
Open

Tooltip for only first stack bar? #136

vishaltanwar opened this issue Jul 16, 2012 · 12 comments

Comments

@vishaltanwar
Copy link

Hi, I'm playing with mouse tracking of values and it works like a
charm, except when I apply it to stacked bars, in that case it just
tracks the first bars values.

You can see a fiddle with the example here:

http://jsfiddle.net/Rude/5VML5/2/

Is there a way of tracking individual bars when stacked?

@acs
Copy link
Contributor

acs commented Jul 26, 2012

Is there any plan to work on this issue? Just to plan my flotr2 working for next months ;)

Thank you guys!

@jbo5112
Copy link

jbo5112 commented Aug 14, 2012

I am going to need this feature fixed for stacked bars somewhat soon. Currently, it sort of works for me. Currently, it tracks the mouse like I'm not using stacked bars, and it's not highlighting anything. The source code has this line under drawHit for bars: "// TODO hits for stacked bars; implement using calculateStack option?". I've tried to work on a fix, but I can't find what is calling the hit function.

@cesutherland
Copy link
Member

It's in a plugin: js/plugins/hit.js

I eventually want to change the entire API for drawing hits, but for now
we're stuck doing it like that.

On Tue, Aug 14, 2012 at 4:57 PM, jbo5112 notifications@github.com wrote:

I am going to need this feature fixed for stacked bars somewhat soon.
Currently, it sort of works for me. Currently, it tracks the mouse like I'm
not using stacked bars, and it's not highlighting anything. The source code
has this line under drawHit for bars: "// TODO hits for stacked bars;
implement using calculateStack option?". I've tried to work on a fix, but I
can't find what is calling the hit function.


Reply to this email directly or view it on GitHubhttps://github.com//issues/136#issuecomment-7740039.

@gadeynebram
Copy link

Hi,

Is there any new information related to this issue?

@ioguix
Copy link
Contributor

ioguix commented Aug 13, 2013

Hi,

Yes, we use both stacked and non stacked graphs, with multiple series and the mouse/hit plugin.

Let me know if we can help in anyway.

edit: oops, I was actually answering your question on #234, I picked the wrong tab, sorry :)

@cesutherland
Copy link
Member

Got it. We'll need to implement the hit method in lines to consider a
'stacked' layout:
https://github.com/HumbleSoftware/Flotr2/blob/master/js/types/lines.js

-Carl

On Tue, Aug 13, 2013 at 6:05 AM, Jehan-Guillaume (ioguix) de Rorthais <
notifications@github.com> wrote:

Hi,

Yes, we use both stacked and non stacked graphs, with multiple series and
the mouse/hit plugin.

Let me know if we can help in anyway.


Reply to this email directly or view it on GitHubhttps://github.com//issues/136#issuecomment-22554737
.

@ioguix
Copy link
Contributor

ioguix commented Aug 13, 2013

I can give it a try if you have some more pointers and tips so I can mess with the code quickly.

@cesutherland
Copy link
Member

Here's another example:
https://github.com/HumbleSoftware/Flotr2/blob/master/js/types/bars.js

hit checks for a hit, drawHit draws the highlight, clearHit clears it.

I think actually this notion of stacked should go into the hit plugin
itself, for the default hit handling. It would apply to stacked points and
stuff as well. That lives here:
https://github.com/HumbleSoftware/Flotr2/blob/master/js/plugins/hit.js

On Tue, Aug 13, 2013 at 11:48 AM, Jehan-Guillaume (ioguix) de Rorthais <
notifications@github.com> wrote:

I can give it a try if you have some more pointers and tips so I can mess
with the code quickly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/136#issuecomment-22574788
.

@sebv
Copy link

sebv commented Sep 24, 2013

Did you managed to fix this? I have similar issue for grouped bar charts.

@ioguix
Copy link
Contributor

ioguix commented Dec 3, 2013

Hi,

I finally took time to work on this. So far, I only have a fix proposal with 'lines' type.

Here is the diff:
https://github.com/ioguix/Flotr2/compare/hit_stacked_lines

I just add the stack offset in data series as third value (so we have (x,y,offset)) for stacked lines and use it in the hit.closest method. If you are ok with this solution, I'll do a push request.

edit: I just found I forgot some commented code, I'll remove them before the push request.

ioguix added a commit to dalibo/opm that referenced this issue Dec 3, 2013
ioguix added a commit to OPMDG/opm-core that referenced this issue Sep 2, 2014
@rutkas
Copy link

rutkas commented Mar 30, 2017

It seems that bug with stacked bars and mouse hints still exists

@rutkas
Copy link

rutkas commented Mar 30, 2017

#312

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

No branches or pull requests

8 participants