HighCharts: Enable/Disable tootip based on mouse click event - highcharts

I need to enable/disable tooltip based on mouse click event. I surfed the net but somehow the suggestions are not working.
Inside the click event I tried chart.tooltip.hide(); but it didnt work. Even if it were to work I need to find the opposite of this function. chart.tooltip.unhide(); and chart.tooltip.show(); are not recognized.
I had read somewhere that chart.container.tooltip.enabled = true; should work, but even this is not a working solution.
Will appreciate if anyone can help me dynamically hide/unhide the tooltip.
Thanks

You have to use chart.tooltip.refresh(point), for example chart.tooltip.refresh(chart.series[0].data[2]);

Related

Tooltip with info on click

I have been looking for something similar to the map at http://www.rottnestisland.com/. As you can see, you click on an icon then a tooltip with information comes up.
Searched for two days now for something similar but I only get the regular tooltips. Do I just edit the tooltip CSS and go from there or am I searching for the wrong thing? I just want to know if what I am looking for is indeed a tooltip or called something else?
Thanks for your help.
Instead using the concept of tool tip we can use simply show hide in a div. In your reference link also they have used opacity in css to show hide the div (Tooltip).

Select2 additional checkbox not checking

Hei guys.
I'm trying to add additional HTML elements below search box.. like checkboxes for filtering purposes.
But the added checkbox is not functional, you can't actually check it. I'm not sure but I think that search box is taking the focus from them... I created this jsFiddle so you guys can check it out.
http://jsfiddle.net/6wz2hLh0/
$("#e1").select2();
//Inserting additional HTML elements below search... filter in my case
$(".select2-search").after("<input type='checkbox'/>");
When the dropdown is open you can't even write in jsFiddle input's.
I tried commenting out various focus calls from source code with no luck.
Can any one point me in to right direction in source code what is causing this non stop search box focussing.
One thing to try is to have the checkbox element stop the mouse events from propagating. That seems to prevent them from getting to Select2, so Select2 cannot kill them.
$("<input type='checkbox'/>")
.insertAfter(".select2-search")
.on('mousedown mouseup click', function(e) { e.stopPropagation(); });
jsfiddle
I'm not sure but I think that search box is taking the focus from them
My guess is that this is because Select2 kills (stops propagation and prevents default) most events that occur within the dropdown. This is so Select2 doesn't leak events, but it also causes problems like not being able to catch click events or embed links.
When the dropdown is open you can't even write in jsFiddle input's.
This is because Select2 uses a mask that captures all events outside of the dropdown.
Can any one point me in to right direction in source code what is causing this non stop search box focussing.
You are going to want to look through the source for killEvent, as this is the method Select2 uses that kills events. As most browsers listen for the click event for native controls, you probably want to remove this killEvent for dropdown clicks.

Vaadin AceEditor focus issues

I have recently downloaded the AceEditor Add-On for Vaadin (http://vaadin.com/addon/aceeditor) and i have a few issues with it, i hope you can help me out!
The first issue is that the ValueChangeListener of the AceEditor is called in every typing event (just like the TextChangeListener), and NOT just when the area looses focus, like in a regular TextArea.
I need a listener that would be called only when the AceEditor looses focus. i have also tried to add a BlurListener to this component, but it is also not working... any suggestions?...
The second issue is also related - when i press the TAB key inside the AceEditor, it just adds a TAB to the text instead of changing focus.
I've tried adding a shortcutListener with KeyCode.TAB but it didnt work... i also tried adding a shortcutListener to the whole Panel. didnt work either. any suggestions about that?...
Thank you!!
Thank you so mucn #Jens Jansson !
The new merge worked!

Unable to Dragend Navigator handles in HighStock

I am using a 'spline' chart type in HighStock. The problem is that when I start using either side handles on the Navigator, I'm not able to stop dragging and the handles get stuck with the mouse cursor. I've tried replicating the issue on JSFiddle but it works fine there. Since it's proprietary data I'm playing with, I cannot really post any code. But I do hope that I have made my question pretty clear. If there's anything else I can add, do let me know.
The problem was that MouseUp DOM event was not firing. I got to know this when I used setExtremes event for xAxis. Then, I looked around and found that I had a $('html').on('mouseup') somewhere in another js file messing it all up.
Removed the mouseup event written on html and voila, it worked :)
Thanks to everyone who gave a thought to this.
Cheers!

Mouse movement / mouseover and JavaScript evaluation in watir

I have a JavaScript-heavy Rails app which I am testing in watir. I have two specific testing requirements:
I need to be able to simulate moving the mouse to a specific area of the screen (or at least triggering the onmouseover event for a div)
Evaluating a snippet of JavaScript once the above has happened to see if a flag is set correctly
I haven't been able to figure out how to do this in watir. Any ideas on how to do this?
For the first question:
browser.div(:id, "some-id").fire_event "onmouseover"
I have no idea how to solve the second question. You could ask at watir-general.
You can look at the following page for mouse controls:
http://wiki.openqa.org/display/WTR/Right+Click+an+Element

Resources