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
Related
i am facing an issue in the highcharts export. We have a custom download button and on click of that we are calling the Highchart exportChart which is redrawing the chart and is messing the chart . Can you please let us know how we can stop the redrawing of the chart while doing export ?
You may have specified some events like "load" in highcharts option, so that events may be called when you export a chart. This may cause problems. Disabling the events while exporting chart, solve the problem.
Official Docs
chart.exportChart({type: 'image/png', filename: 'file-name'},{
chart:{
events:null
}
});
This happens because of your load function in event.
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.
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!
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.
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
},