Highcharts disable Redraw after setExtremes - highcharts

I want to disable the chart Redraw event which happens after the setExtremes event . I am talking about even after disabling the liveRedraw ,the chart executes the setExtremes on mouseup after leaving the navigator , then immediately executes the redraw.
I am trying to show a loader on the screen in the setExtremes call but the loader does not appear on the screen. On profiling the same it looks like the paint function to draw on the screen is called only after the Redraw event has finished.
I’d say the flow should be
SetExtremes :
ShowLoader ()
The loader should now appear on the screen while the chart continues to render the data points then eventually call the Redraw event and then the loader will be hidden after the Redraw event.

Related

Highcharts with reveal.js: Refresh chart with slide?

I would like to include a Highchart graphic in a reveal.js presentation. The chart integrates fine, but the chart animation (e.g. growing of bar charts) plays while the "slide" is not visible yet.
How can I force an animation "refresh" when the slide changes?
Thanks for your help!
One way is to simply create the chart again when you want the animation to start.
I'm not an expert on Reveal.js, but it looks like you have an event when a slide is changed which you could use to redraw your chart to animate it:
Reveal.addEventListener( 'slidechanged', function( event ) {
redrawChart();
} );

Highchart export is calling events

I'm having this problem. I'm using the load and setExtremes events on my chart.
When I click on the export button, all then event are lauched.
The events are causing some undesired behavior.
I would like to disable the events calling on export.
Is this posible?
You can use chartOptions and disable chart -> events http://api.highcharts.com/highcharts#exporting.chartOptions

Datetime Highchart with selection event, set wrongly the extremes

I am trying to do the same as regular zooming, but I use:
events : { selection : function(event) {
instead of the regular zooming (it is part of something --> Launch Highcharts zooming programmatically (after a selection))
The problem. When I select (via selection, like zooming) an interval (for example something between 00:00 and 01:00) the zoom shows another area. How can I solve this?
http://jsfiddle.net/FSfR2/4/
You've overcomplicated your problem, just pass the min and max you get in the event to the setExtremes function
chart.xAxis[0].setExtremes(event.xAxis[0].min, event.xAxis[0].max);
http://jsfiddle.net/bhlaird/wmyM4/

highstock - control when tooltip appears

By default, the tooltip appears as soon as the cursor enters the chart. I would like to control when it first appears in one of two ways:
Wait for user to hover over (around) a data point on the chart.
This way the user can look at the entire chart without the
distraction of the tooltip.
mousedown - is there a way to disable the default mousedown function
and use it for displaying the tooltip instead? And because the
tooltip and crosshair seem to be joined, perhaps the same mousedown
event could fire the crosshair to appear?
number 2 would be best; any suggestions/solutions would be appreciated!
Number 2 is possible to achieve by:
disable default Highcharts tooltip
create point.click event handler
in above handler, create your own tooltip (it's simple div with some CSS)
make proper position for tooltip (accessed via this.point.plotX and this.point.plotY

Get notice when a Highcharts chart is change after change the window size

Is there a way to get noticed when a chart is redrawn after the window size changed. Listen to the window change event itself is not a good idea cause I cant rely on which event if is fired first the one that is redrawn the graph or mine.
The chart redraw event fires when the chart div resizes http://api.highcharts.com/highcharts#chart.events.redraw
events: {
redraw: function () {
alert("redrawing chart");
}
}
Note, this fires for other reasons as well e.g. when you add a datapoint, or modify series options etc.

Resources