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

CPTTextLayer not rendering text properly #419

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a CPTTextLayer with some text and a background color.
2. Create a CPTLayer with the text layer
3. Create a CPTAxisLabel with the CPTLayer
4. Set the CPTAxisLabel as the custom label for an axis tick location that is 
NOT visible in the screen.
5. Scroll to see the custom label.

What is the expected output? What do you see instead?
The expected output is a custom label with the text and the background, but I 
see only the background.

What version of the product are you using? On what operating system?
Core-Plot 1.0 on Mac OS X 10.6.8 and the application is running on iOS 5.0 
(with iOS 4.0 we have the same issue)

Please provide any additional information below.
I'm trying to create a custom label for axis that needs several text layers. 

Original issue reported on code.google.com by irodrig...@gmail.com on 2 Apr 2012 at 8:32

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 4 Apr 2012 at 11:21

GoogleCodeExporter commented 8 years ago
It wasn't a duplicate I think, they were slightly diffrent issues.
This happens always and 421 only when collapsesLayers is YES.
And this happens for labels that are out the visible space initially, while 421 
happens for labels that are initially visible.

Original comment by irodrig...@gmail.com on 5 Apr 2012 at 1:47

GoogleCodeExporter commented 8 years ago
I solved this by making the graph's hosting view frame the same size of the 
graph, so all labels "thinks" they're visible, then used a UIScrollView to 
scroll.

Original comment by irodrig...@gmail.com on 5 Apr 2012 at 1:49

GoogleCodeExporter commented 8 years ago
Unmerged. I didn't notice the difference. Thanks for the heads-up.

Original comment by eskr...@mac.com on 5 Apr 2012 at 9:14

GoogleCodeExporter commented 8 years ago
Core Plot doesn't support the backgroundColor property. The superclass of 
CPTTextLayer was changed after the 1.0 release. It is now a subclass of 
CPTBorderedLayer which gives it a fill property.

Pull the latest code with Mercurial. Then the label background can be changed 
using the following:

((CPTTextLayer *)(newLabel.contentLayer)).fill = [CPTFill 
fillWithColor:[CPTColor redColor]];

Original comment by eskr...@mac.com on 22 Apr 2012 at 10:31