Created
October 23, 2012 13:51
-
-
Save victor/3938857 to your computer and use it in GitHub Desktop.
patch for core plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r c4b3ac52ecc8 framework/Source/CPTXYPlotSpace.m | |
--- a/framework/Source/CPTXYPlotSpace.m Wed Oct 03 20:47:35 2012 -0400 | |
+++ b/framework/Source/CPTXYPlotSpace.m Tue Oct 23 15:45:50 2012 +0200 | |
@@ -6,6 +6,7 @@ | |
#import "CPTGraphHostingView.h" | |
#import "CPTMutablePlotRange.h" | |
#import "CPTPlot.h" | |
+#import "CPTBarPlot.h" | |
#import "CPTPlotArea.h" | |
#import "CPTPlotArea.h" | |
#import "CPTPlotAreaFrame.h" | |
@@ -354,6 +355,15 @@ | |
for ( CPTPlot *plot in plots ) { | |
CPTPlotRange *currentXRange = [plot plotRangeForCoordinate:CPTCoordinateX]; | |
CPTPlotRange *currentYRange = [plot plotRangeForCoordinate:CPTCoordinateY]; | |
+ | |
+ if ([plot isKindOfClass:[CPTBarPlot class]]) { | |
+ if (((CPTBarPlot *)plot).barsAreHorizontal) { | |
+ currentYRange = [(CPTBarPlot *)plot plotRangeEnclosingBars]; | |
+ } else { | |
+ currentXRange = [(CPTBarPlot *)plot plotRangeEnclosingBars]; | |
+ } | |
+ } | |
+ | |
if ( !unionXRange ) { | |
unionXRange = [currentXRange mutableCopy]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment