Skip to content

Error in Candlestick trace with TypedArrays #3339

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

Closed
jonmmease opened this issue Dec 15, 2018 · 0 comments
Closed

Error in Candlestick trace with TypedArrays #3339

jonmmease opened this issue Dec 15, 2018 · 0 comments
Labels
bug something broken

Comments

@jonmmease
Copy link
Contributor

There seems to be an error when specifying the open/close/low/high properties of a candlestick trace with typed arrays:

Versions: Confirmed on 1.42.5 and current master (9bbe295)
CodePen: https://codepen.io/jonmmease/pen/ebZVyp
Example:

var trace1 = {
  x: ['2017-01-04', '2017-01-05', '2017-01-06'], 
  type: 'candlestick', 

  // Works fine with standard arrays
  // close: [116.019997, 116.610001, 117.910004],
  // high: [116.510002, 116.860001, 118.160004], 
  // low: [115.75, 115.809998, 116.470001], 
  // open: [115.849998, 115.919998, 116.779999],
	
  // Fails with typed arrays
  close: new Float32Array([116.019997, 116.610001, 117.910004]),
  high: new Float32Array([116.510002, 116.860001, 118.160004]), 
  low: new Float32Array([115.75, 115.809998, 116.470001]), 
  open: new Float32Array([115.849998, 115.919998, 116.779999]),
};

var data = [trace1];

Plotly.plot('plotly-div', data);

Expected Result:
newplot-4

Result:
No plot is displayed and this error occurs in the JS console
screen shot 2018-12-15 at 5 57 25 am

@etpinard etpinard added the bug something broken label Dec 17, 2018
etpinard added a commit that referenced this issue Dec 17, 2018
fix #3339 - typed arrays support for ohlc / candlestick traces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants