Highcharts resetZoom xy after klickin on a rangeSelector - highcharts

Is it possible to reset the choosen xy zoomvalue after klickin on a rangeSelector (e.g. 1y), because the chart looks distorted when I am switching from xy zoomvalue to a specific range.
Cheers

This is how Highstock works, see this thread.
What come cross my mind is to disable range selector and use your own button which will reset extremes (via setExtremes()).

Related

HighCharts - Zoom View Resets

We are building an iOS app using HighCharts components. Defined HIColumn for Bar Chart in XAxis with couple of HISpline (AreaChart) overlay on yAxis that can be toggled. When a user is zoomed in to a specific xAxis period, upon adding the spline, the Chart looses the Zoom and redraw itself. Is it possible to add a spline at runtime without loosing the zoom? These are the things I tried:
Set Min/Max on XAxis. How can we get the current Min/Max/tickInterval when the user zoom in on the xAxis.
Instead of dynamically adding the spline, tried making it visible true/false but still the chart refresh and lose the zoom.
Any help is appreciated.
Thanks!

Changing lables on x-axis like from Monday to show M as per window size in HighCharts

I am using highcharts library to draw chart and I need to display Weekdays as labels on x-axis and also to auto reset it like from Monday to M if all weekdays can't fit on screen.
It should be dynamic, which means no flickering should appear when changing label text on x-axis.
Any suggestions?
Thanks in advance.
There is no straight option for that, rather simple workaround:
Disable reflow from Highcharts, use window.resize browser event
In that event add condition to decide showing full name of just shortened, and set this for chart - chart.xAxis[0].dateTimeLabelFormats should be fine
After setting new format, apply new chart dimensions using chart.setSize(w, h)

How to display a tooltip while selecting for zoom

While selecting a range for zooming a Highcharts chart, I'd like to be able to display a tooltip showing the limits of the selected range (min/max x for zoomType x; min/max x and y for zoomType xy).
Is this possible and how would I go about implementing it? Is there for example an event that is fired repeatedly while selection is in progress?
You can catch setExtremes() function and implement your custom tooltip (i.e as a div)
http://api.highcharts.com/highstock#xAxis.events.setExtremes

highcharts - zoom issue after changing series data

There is a strange behavior ar may be even bug in highcharts. If I change series data while chart is zoomed, I can't zoom it anymore:(((
Here are steps to reproduce
Goto http://jsfiddle.net/CXKmD/2/
Zoom chart using mouse
Click "Change" button to change chart's data
Try to zoom again using mouse
The problem is that after these steps event.xAxis is undefined, so we can't get min/max values of mouse zoom selection.
Are there any workarounds to let chart change it's data in zoomed state and then zoom it even further?
Not a bug
You are unnecessarily converting the timestamps to date objects, whereas the setExteremeMethod expects timestamps, while now you are passing it a date. Changed your code to this and it worked
if (event.xAxis[0]) {
startDt = event.xAxis[0].min;
endDt = event.xAxis[0].max;
}
fiddle # http://jsfiddle.net/jugal/tdkwy/

Highstock - How to change tooltip color

I'm using a highstock chart similar to this example - http://jsfiddle.net/93HQn/2/. What I"m trying to add is for the % value in the tooltip to be red if it is a negative value or green if it is positive value. Has anyone done this before?
Thanks,
Linda
You can change the color of any potion of the tooltip based on a value or calculation. I modified your jsfiddle to show how to change the color of the percentage based on if it is positive or negative.
Define a formatter function for your tooltips:
http://api.highcharts.com/highcharts#tooltip.formatter
With that you should be able to take full control of the tooltip contents.

Resources