It is currently Mon Sep 24, 2018 6:50 am Advanced search

Irregular timeseries data with night and weekend gaps

Technical support for the Highcharts Stock package

Re: Irregular timeseries data with night and weekend gaps

Postby stevenp » Thu Mar 15, 2012 11:59 am

Did you create a new feature request ? I'll vote if you do. At the moment, the solution would not be suitable for charting intra-day prices of infrequently traded stocks.
stevenp
 
Posts: 49
Joined: Thu Jun 09, 2011 10:08 am

Re: Irregular timeseries data with night and weekend gaps

Postby Kennedy » Thu Mar 15, 2012 1:28 pm

hfrntt wrote:I don't see any other feature request so you can post new and post a link to it here and in the previous feature request.

I don't see any other feature request either...



________
Flv to avi
Kennedy
 
Posts: 1
Joined: Thu Mar 15, 2012 1:18 pm

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Thu Mar 22, 2012 6:03 pm

I have now created a request for this feature, linking it back to this thread. Please go and vote for it!

http://highcharts.uservoice.com/forums/ ... ts-and-wee
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Wed Oct 24, 2012 10:05 am

Any progress with this issue? I'm seeing it has received a moderate amount of votes in the poll. Our team will need to look at other charting solutions for our software under development unless this feature is implemented within months, preferably for both highcharts and highstocks.. :( Missing this feature is the only show-stopper for us atm, otherwise everything is just great!

The world I'm forced to live in:

Image

People who love Highcharts and Highstocks as much as we do should vote for this must-have feature at:

http://highcharts.uservoice.com/forums/ ... ts-and-wee

I could attempt to patch this feature in myself if I could get a couple of pointers from a developer who knows his way around the Highcharts/-stocks source...

All the best!
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby lanbo » Wed Oct 24, 2012 10:18 am

Keep xAxis with "ordinal: true" and then in your server module introduce null values for all the points you don't have data available.
lanbo
 
Posts: 34
Joined: Tue Sep 04, 2012 6:02 pm

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Wed Oct 24, 2012 11:36 am

lanbo wrote:Keep xAxis with "ordinal: true" and then in your server module introduce null values for all the points you don't have data available.


You have not understood the feature request. From the api under ordinal:

In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data for nights or weekends will not take up space in the chart. Defaults to true.


I do not want my points to be equally spaced. I have actual event-based timestamped data with arbitrary intervals, NOT data sampled eg. every minute. But I still want to skip nights/weekends/any empty time exceeding an arbitrary time T.

Regards,
djh
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby lanbo » Wed Oct 24, 2012 5:53 pm

Yes, I understood.

Same as you I didn't want my points to be equally spaced.
However I had to do it to go around that problem.

1) You set ordinal to true
2) You insert "null" data points in your json wherever you don't have data except in weekends. Null points will not show. Previous and next elements to a null value will be just connected.

Imagine your data is [1,10], [2,20], [5,40], ...
You will need to create the following: [1,10], [2,20], [3,null], [4,null], [5,40]

So.. insert nulls except in the cases where you are in a weekend.
It's a bit of more work in the server side but this is better than waiting until the developers have time to add this feature.
lanbo
 
Posts: 34
Joined: Tue Sep 04, 2012 6:02 pm

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Thu Oct 25, 2012 9:28 am

lanbo wrote:Imagine your data is [1,10], [2,20], [5,40], ...
You will need to create the following: [1,10], [2,20], [3,null], [4,null], [5,40]


I'm dealing with large amounts of millisecond-precision data, so if I want to convert the data to ordinal I have to either:

1) Artificially insert values for every millisecond for which there is no new data (produces way too many (millions) unnecessary data points)

or

2) upsample my data to eg. second or minute precision (accuracy is lost)

Neither one of these options are acceptable, so I guess I'll just have to wait... I would appreciate a comment from the developers though.
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby lanbo » Thu Oct 25, 2012 12:49 pm

I'm dealing with similar stuff.
In fact, you don't need to to that in the server. You could also put that logic into javascript...

I decided to put the logic in the server. The bad news is I'm sending lots of data, but since it's compressed I believe gzip does a good job (many repeated null values).

BTW, you could upsample your data and then pass your non-null values with additional custom property with real precise value and then use it with the formatter function.

It sucks but highcharts is a beautiful soft package and I can understand developers do what they can.
lanbo
 
Posts: 34
Joined: Tue Sep 04, 2012 6:02 pm

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Wed Nov 13, 2013 11:19 am

Hi Torstein,

Any plans to implement this feature? It's been almost two full years waiting for this feature and it has received a fair amount of votes in the poll.

Our product is launching in Q1/2014 and the financial use case (among others) would definitely benefit from this feature. Two years ago, at the very start of our product development, I considered Highcharts/Highstocks to be the best javascript charting library and I still think so. Your product has definitely become more robust in two years. However you have had this one crucial feature missing for way too long.

Best,
Henri Pihkala, CTO @ Unifina
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby torstein.honsi » Thu Nov 14, 2013 10:21 am

Thanks for writing! I agree with you, this is a missing feature in Highstock. We will try to find time to implement this before too long, but as you know, there are plenty of high priority features and enhancements to choose from for Highcharts and Highstock, so we can't promise anything.
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9210
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: Irregular timeseries data with night and weekend gaps

Postby djh » Fri Sep 05, 2014 1:38 pm

Torstein, any news on this? Thanks
User avatar
djh
 
Posts: 17
Joined: Mon Dec 19, 2011 1:16 pm

Re: Irregular timeseries data with night and weekend gaps

Postby jonA76 » Mon May 30, 2016 3:33 am

Have followed this thread with much interest.

Feels as though I have a similar query but perhaps I am missing something and there is a best practise for showing stock price data:

I'd like to display Apple share price for the past 5 years - clearly this is a job for HighStock as I would like to leverage the range selector.
I'd also like to consolidate my data into irregular intervals with the
- past day being at 1 minute interval
- past week up to previous day being 10 minute interval
- past month up to previous week being 1 day interval
- etc etc

Trying this in JSfiddle using ordinal = false looks ok except for weekends when you range to 1 week.
http://jsfiddle.net/jonabitz/5hn8k687/
(My data is staggered but not exactly as described above)

Is there anyway to make the 1w version of graph look more 'normal' by suppressing overnight and weekends?

Or perhaps there is simply a better practise or best practise to follow...
A simple solution is to load 1 minute resolution data for past 5 years but as we are never zooming and panning (only ranging) this feels unnecessary - we'd be sending a significant amount of data for year 2 to 5 that will never really be 'seen'.

any and all thoughts welcome
jonA76
 
Posts: 1
Joined: Mon May 30, 2016 3:22 am

Re: Irregular timeseries data with night and weekend gaps

Postby KacperMadej » Mon May 30, 2016 1:14 pm

Hi Jon,

Thank you for contacting us.

It is possible to set breaks for xAxis to hide time spans you do not want to display.
API: http://api.highcharts.com/highstock#xAxis.breaks
Example: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/demo/intraday-breaks/

Please let us know if you have more questions.

Best Regards,
Kacper Madej
Kacper Madej
Highcharts Developer
KacperMadej
 
Posts: 4507
Joined: Mon Sep 15, 2014 2:43 pm

Previous

Return to Highstock Usage

Who is online

Users browsing this forum: No registered users and 1 guest