kaiserfarrell / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Problem with axis labels when printing offscreen views on the Mac #497

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When printing an off-screen CPTGraphHostingView on the Mac, the resulting 
preview in the print panel does not contain axis labels. 

Steps to reproduce: 
- Build and run the attached "DatePlot" example with Xcode 
- Check the preview in the upcoming print panel 

Expected result:
There should be labels on the axis ticks.

Actual result:
There are no labels

Regression:
The problem seems to come from the fact that the labels are generated by the 
-relabel call in -[CPTXYAxis renderAsVectorInContext:]. But for the first 
vector rendering, this is too late, as pass through 
-recursivelyRenderInContext: has already passed the point where the labels 
should have been.

I can work around the problem by adding a [self relabel] call to -[CPTAxis 
layoutSublayers] (like in -[CPTPlot layoutSublayers]) but I doubt that this is 
the correct fix for the issue.

Original issue reported on code.google.com by frank.il...@googlemail.com on 16 Jan 2013 at 4:30

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 17 Jan 2013 at 12:46

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 1df66c93aa81.

Original comment by eskr...@mac.com on 20 Jan 2013 at 1:42