gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

0.2.2 OHLC open and close on wrong sides #272

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an OHLC chart 
ohlcPlot.plotStyle = CPTradingRangePlotStyleOHLC
2. use some data from Yahoo or another reference
3. compare the Open and Close values. They are switched.

Looking in CPTradingRangePlot.m

in
-(void)drawOHLCInContext:(CGContextRef)context x:(CGFloat)x open:(CGFloat)open 
close:(CGFloat)close high:(CGFloat)high low:(CGFloat)low

open should be on the left but is currently set to the right (per the comment)
CGPoint alignedOpenEndPoint = CPAlignPointToUserSpace(context, CGPointMake(x + 
theStickLength, open)); // right side

close should be on the right but is currently on the left (per the comment)
CGPoint alignedCloseEndPoint = CPAlignPointToUserSpace(context, CGPointMake(x - 
theStickLength, close)); // left side

Original issue reported on code.google.com by kanedijk...@gmail.com on 23 Mar 2011 at 3:19

GoogleCodeExporter commented 9 years ago
This was a bug, and fixed in the main branch. Checkout the mercurial repository 
to get the change.

Original comment by drewmcco...@mac.com on 25 Mar 2011 at 11:01