Allow specification of indices for series from one data array
I have data that is 10's of thousands of points per chart, so the named value pair form of the chart won't work. So I'd like to request a new feature. Where you let me use 1 or 2 indexes into the point data to define a series, but allow me to access all of the data from the tooltip. So for a line chart I would define the series by the array name, and 1 index and for a scatter chart I would define the series by the array name and 2 indices. But the this.point would refer to all the fields at that index. It seems that this would be logically equivalent to the name value pairs, except that the data expansion with all of the redundant strings wouldn't be there. It does represent some data expansion though so some hit for memory and performance would be there. But then the interactive options to the user would be far greater.
I’m not sure I get you, but perhaps you can solve your task by using parallel arrays? http://jsfiddle.net/highcharts/uBVzY/
-
Bonnie Smithson commented
I'll try it!
-
Instead of a parallel array you can use a hash table where the x data works as key for the extended obect.
-
Bonnie Smithson commented
If there was a point.index() function that would retrieve the index of the point I am looking at, I could use parallel arrays. But I think it would probably involve less over head to just be able to access the other elements on this entry. For example, instead of point.x() and point.y(), could they me aliases for point[0] and point[1], and then allow []'s to select other fields in the array while allowing series data to be defined in terms of an array name and index values. So line charts would have 1 index, scatter chants would have 2 indices, and ohlc would have 4 indices to define the series.
-
Bonnie Smithson commented
Actually I spoke too fast -- I have datetime data. So I can't use point.x as the index with which to access the parallel array. My datetime data does not occur on regular intervals. Can I extract the index somehow from a 2 dimensional array that has a datetime as the x axis value?
-
Bonnie Smithson commented
Yes! I didn't know about that feature! Can you point me to the documentation where I could have learned about it?