Closed GoogleCodeExporter closed 9 years ago
here's the diff in case you can use it right away:
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];
}
Original comment by victor.j...@gmail.com
on 23 Oct 2012 at 2:06
This behavior was intentional. See my comment on issue 338:
http://code.google.com/p/core-plot/issues/detail?id=338#c1
-scaleToFitPlots: should behave the same for all plot types. It computes ranges
that exactly fit the plot data, excluding any bars, plot symbols, or other
decorations.
Original comment by eskr...@mac.com
on 3 Nov 2012 at 3:39
Original issue reported on code.google.com by
victor.j...@gmail.com
on 23 Oct 2012 at 8:29