Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Candlestick in the navigator is not displayed when points are given as objects #1905

Open
sebastianbochan opened this issue May 31, 2013 · 8 comments

Comments

Projects
None yet
5 participants
@sebastianbochan
Copy link
Contributor

commented May 31, 2013

Example: http://jsfiddle.net/jmfxz/

The data is not displayed as an area series in the navigator.

@TorsteinHonsi

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2013

Workarounds

  1. Use array point configs instead: http://jsfiddle.net/highcharts/jmfxz/1/
  2. Or set an explicit Y value that the area series can use: http://jsfiddle.net/highcharts/jmfxz/3/
@TorsteinHonsi

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2013

It happens because the data is simply copied from the base series to the navigator, and the area series in the navigator doesn't understand the object literal with open, high, low and close properties. A fix would mean that we iterate over the data set and either add y properties or translate it back to array format. It wouldn't be very effective though.

@raphaelfeng

This comment has been minimized.

Copy link

commented Jul 31, 2013

The data may be referred at somewhere else, so the object literal could be useful.
And the color, name of a point need to be passed in as the example in the Highcharts API gives:
data: [{
name: 'Point 1',
color: '#00FF00',
y: 0
}, {
name: 'Point 2',
color: '#FF00FF',
y: 5
}]

So is it possible to reuse the translated xData, yData and zData from the base series in the navigator series?
Thus, we can avoid translating again for the navigator series.

@raphaelfeng

This comment has been minimized.

Copy link

commented Aug 14, 2013

Done a test for a stock chart with around 8000 data entries (8000 x 4 = 32000 numbers as every stock data point have four values for open, close, high and low).
Looking into the execution time of the Series.setData() function (where all the data set are iterated over and object array is translated to number array), it only takes 48ms to iterate over the data set and translate the object array to number array.

The difference between using the number array and object array is 44ms
But considering the total execution time is almost 3 seconds, it doesn't looks a big performance bottle neck in the whole process.

So even we do the translation from object array to number array again for the navigator series, it may be desired to pay the additional tens of milliseconds performance cost to use the options which need to be passed as object array as mentioned in previous comment:
data: [{
name: 'Point 1',
color: '#00FF00',
y: 0
}, {
name: 'Point 2',
color: '#FF00FF',
y: 5
}]

So could you please look into it?

Test results for Stock chart with 8000 data entries:

Pass data as number array:(benefiting from the turbo mode)
highstock-8000_points-number_array

Pass data as object array: (not using the turbo mode)
highstock-8000_points-object_array

@TorsteinHonsi

This comment has been minimized.

Copy link
Collaborator

commented Aug 15, 2013

I updated my workarounds above, see workaround number 2.

@JPustkuchen

This comment has been minimized.

Copy link

commented Dec 12, 2013

I can confirm, that this problem still exists. Is a fix planned for the future?

@steve-nD

This comment has been minimized.

Copy link

commented Dec 9, 2015

Two years and the problem is still not resolved? I can confirm this problem still exist with both the Candlestick and OHLC charts. Any ETA on a fix?

TorsteinHonsi added a commit that referenced this issue Feb 1, 2016

Highstock: Fixed #1905, navigator series didn't display when the base…
… series was OHLC or candlestick with object data configs. (reverted from commit e196b72)

The commit broke all OHLC and candlestick demos with array data.

@TorsteinHonsi TorsteinHonsi reopened this Feb 1, 2016

@TorsteinHonsi

This comment has been minimized.

Copy link
Collaborator

commented Feb 1, 2016

The commit above broke all OHLC and candlestick demos with array data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.