It is currently Sat Jul 26, 2014 11:08 am Advanced search

High and Low for the entire chart displayed

Technical support for the Highcharts Stock package

High and Low for the entire chart displayed

Postby atomicfuze » Mon Aug 08, 2011 10:16 pm

I'd like to put the High and Low for the entire chart currently displayed at the top of the chart somewhere. Is this possible?

Something like this
Image
atomicfuze
 
Posts: 10
Joined: Fri Aug 05, 2011 7:19 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Tue Aug 09, 2011 10:59 pm

Sure it is, but it requires some custom work. You need just four things:
- your own text element, you can render this using renderer,
- getExtremes() function which show gives you actual min and max point values,
- setEtremes event
- a few Highcharts APIs magic spells

and you can get this: http://jsfiddle.net/yD6G7/1
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby atomicfuze » Wed Aug 10, 2011 11:28 pm

Thank you so much for your work. The only problem is it doesn't seem to be displaying accurate hi and low values all the time.
atomicfuze
 
Posts: 10
Joined: Fri Aug 05, 2011 7:19 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Thu Aug 11, 2011 9:23 pm

It shows min/max values which you can read using tooltip, but some values can be different because of dataGrouping.
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby smiller » Thu Aug 11, 2011 10:09 pm

hfrntt, you sir, are a gentleman and a scholar. Great response. Thanks.
smiller
 
Posts: 19
Joined: Fri Aug 05, 2011 12:07 am

Re: High and Low for the entire chart displayed

Postby atomicfuze » Fri Aug 12, 2011 5:15 am

I guess I'm not fully understanding. What I need it to do is show the lowest and highest value currently displayed on the graph. When you change the range of data selected then sometimes it doesn't show accurate lows and highs currently displayed. I apologize if this is simple but I don't understand and need that functionality before my boss will authorize me to purchase the license.
thanks,
-Brian
atomicfuze
 
Posts: 10
Joined: Fri Aug 05, 2011 7:19 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Sun Aug 14, 2011 9:24 pm

And as I posted before, it shows extreme values parsed by Highcharts in current zoom. If you're aware that some data are higher or lower, it could be caused by dataGrouping, check the approximation and smoothed properties. If it doesn't help, could you tell me how I can reproduce this issue (I suppose that it requires some your data).
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby atomicfuze » Mon Aug 15, 2011 7:28 pm

Just using the example you gave me if you slide the bottom scroll bar to select a larger range it shows a wrong high value.

Image

Image
atomicfuze
 
Posts: 10
Joined: Fri Aug 05, 2011 7:19 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Tue Aug 16, 2011 10:00 pm

I modified it a little bit. I hope it'll work now. See: http://jsfiddle.net/yD6G7/2/
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby atomicfuze » Fri Aug 19, 2011 5:18 pm

Fantastic, works like a charm!

Question: I'm also using highcharts "time series, zoomable". I've applied this code to it and the High works but the Low just shows 0.00 no matter what. Do you know what's causing that?

Thanks again.
-Brian
atomicfuze
 
Posts: 10
Joined: Fri Aug 05, 2011 7:19 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Tue Aug 23, 2011 1:47 am

Sorry for late reply, could you post a link to your site to show this live?
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby vondutch9 » Tue Jan 24, 2012 9:00 am

Hi, there seems to be a bug in HighStock code. The high and low values being displayed are of a previous view. For eg, on initially when the chart is loaded in the example fiddle, it shows the values as high:0.74190 Low: 0.67380. The rangeselector button selected is 3m. Now if you select the zoom to be 1m, the high low still shows the old values while if you look from the graph, the high is 0.7024 and the low is 0.67380.

Thus the bug is that the event is fired before updating the extremes and thus reflects the old high low values from the previous range. Appreciate if someone can file a bug in the bug system for this.

Thanks!
vondutch9
 
Posts: 5
Joined: Wed Jun 29, 2011 11:43 am

Re: High and Low for the entire chart displayed

Postby vondutch9 » Tue Feb 07, 2012 9:45 am

Here is a fiddle to reproduce the issue - http://jsfiddle.net/FWTFQ/1/.

The apple stock price graph loads with 1m data. Now when I click on '3m' should update the labels for high low (the high should be updated to 422.24 and low to 363.27). When you click again on '1m' or anything else in the range selector, it updates the high lows for the previous range. The high and lows are being read from dataMin and dataMax so it seems they are not being updated properly.
vondutch9
 
Posts: 5
Joined: Wed Jun 29, 2011 11:43 am

Re: High and Low for the entire chart displayed

Postby hfrntt » Fri Feb 10, 2012 2:46 am

Yep, but why you didn't read the whole topic? I posted working demo above (exactly here: viewtopic.php?f=12&t=11738&p=64742#p53102).
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: High and Low for the entire chart displayed

Postby vondutch9 » Wed Feb 15, 2012 6:27 pm

Hi hrfntt, I think you did not get the point. I could make it work. But what I wanted to say is that the values displayed are wrong. Look at this screenshot below.
high_low_bug.jpg
high_low_bug.jpg (27.74 KiB) Viewed 2558 times


In this chart the high and low values being displayed are 406.53 and 373.20 but if you look at the values on the tooltip the high is actually 422.24. Thus the values being displayed on the labels are wrong. When the chart was loaded, 1m was the selected range and the high lows belong to that range. Now when you click on 3m, the range should have updated accordingly with the high as 422.24 and corresponding low but it doesn`t. It only updates after you click on any other button say '1m'. Now '1m' range will display 422.24 as the high which is incorrect. The values displayed on high low labels are not from the current range but the previous range.
vondutch9
 
Posts: 5
Joined: Wed Jun 29, 2011 11:43 am

Next

Return to Highstock Usage

Who is online

Users browsing this forum: Bing [Bot] and 4 guests