Event afterSetExtremes is firing repeatedly with Highstock 1.3.0 - highcharts

I just upgraded my app to use Highstock 1.3.0.
Prior to the upgrade, the xAxis.events.afterSetExtremes event fired only once, after the user stopped sliding or adjusting the x Axis range slider.
Now, the event fires repeatedly. Is this change in behavior intended? If so, is there a best practice way to throttle, or to know when the user activity has stopped?
p.s. "prior" ===> Highstock JS v1.2.5

After investigation (looked at the latest async load demo) I discovered an attribute that I can set in the options of a new Chart that seems to solve this problem:
scrollbar: {
liveRedraw: false
},

Related

Highcharts synchronized Typescipt issue

I am working on creating the synchronised chart in Typescript. After adding all the typescript declarations, the synchronised tooltip stopped working as it's was working before. I can't see the tooltip for multiple charts when hovering on any any chart.
I would like to see the expected behaviour of sync tooltip.
https://www.highcharts.com/docs/advanced-chart-features/highcharts-typescript-declarations.

How to disable the animation of the datalabels on a pie chart with HIghcharts?

I have a page running a couple of charts done with HighCharts. I'm also running PhantomJS to save the pages as PDFs. Due to the way PhantomJS works, I need to disable all of the animations on HighCharts to allow it to save the page correctly. Problem is, I can't find a way to disable the animation of the datalabel on a Pie chart. The plot animation is disabled, the chart animations are disabled, but the datalabels are still animated (coming from the left of the page to sit on its correct location). How can I fix it?
You probably need to set the series.animation to false as well. See this example.
plotOptions: {
series: {
animation: false
}
},
Note that I am not able to test if the dataLabels animate or not. I have not seen them animate.
So I found the issue, it is not on the Highcharts main sourc. I'm using Dojo, and not jQuery, so I installed this adapter. Problem is, that adapter adds the animation, and not HighCharts itself. I realized it when I created the jsFiddle, and saw that using jQuery was giving a different behavior than using dojo.

Highcharts: tooltip Click instead of hover

Is there a setting for highcharts tooltips where you can set it to display on click versus hover?
I have seen a lot of people discussing the tooltip staying on click but then there is still the hover present. Is there a way to disable the hover and use only click?
There is not a setting for that in Highcharts currently.
There is a feature request for this functionality here: http://highcharts.uservoice.com/forums/55896-general/suggestions/2607304-allow-the-tooltip-to-appear-when-a-point-is-clicke
Feel free to add your votes and comments.
UPDATE:
I have started using the jquery UI dialog for this purpose.
I disable the tooltip in Highcharts, and add a click event to the point in the plotOptions.
In that click function I call an external function, sending it the point object, and build my tooltip within the dialog.
http://jqueryui.com/dialog/
http://api.highcharts.com/highcharts#plotOptions.series.point.events.click
You could also use Highslide for this purpose, and keep it all in the family.
http://highslide.com/
Working example:
http://jsfiddle.net/jlbriggs/LHZ3E/embedded/result/
Adding for those who has problems like me with useHTML: true and wants to display tooltip only on click and not on hover and wants to have only one tooltip on screen.
Here is a fiddle.

Highstock 1.3 afterSetExtremes throttling

I updated Highstock.js to 1.3 and noticed that the afterSetExtemes event fires on every drag event as opposed to dragend/mouseup. I'm updating the main series via ajax but now this causes hundreds of ajax calls to fire simultaneously. I can't seem to find the setting to prevent this. Has anyone else seen this problem?
I experienced the same issue.
The option you are looking for is:
scrollbar: {
liveRedraw: false
}
Check out my question which I posted the answer on:
highstock 1.3 disable navigator dragging redraw

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