hide labels during animation

30 views
Skip to first unread message

Giampaolo Trapasso

unread,
May 11, 2012, 11:08:53 AM5/11/12
to coreplot...@googlegroups.com
Hi to all,
i would like to hide labels during an animation of a plot. I thought that I could use a flag "animationIsRunning" and use it in 

-(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex: (NSUInteger)index 

to return labels when flag is false and return nil when flag is true, forcing a reload of data. Is there a different (may be more elegant) solutions?

Thank you in advance.

Giampaolo

Eric

unread,
May 11, 2012, 4:15:42 PM5/11/12
to coreplot...@googlegroups.com
No. Reload once to remove the labels and again to put them back.

Eric

Giampaolo Trapasso

unread,
May 22, 2012, 9:42:46 AM5/22/12
to coreplot...@googlegroups.com
Thank you for your reply. I'm going to follow it. But a question more arises: why this code does not do what i'm looking for?

for (CPTPlotSpaceAnnotation *a in _masterPlot.annotations) {

                [a.contentLayer setHidden:YES];


I would like to understand a bit more about plot space annotation class.


gp



2012/5/11 Eric <esk...@mac.com>

--
You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coreplot-discuss/-/WXsbwlPE3moJ.

To post to this group, send email to coreplot...@googlegroups.com.
To unsubscribe from this group, send email to coreplot-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coreplot-discuss?hl=en.

Eric

unread,
May 22, 2012, 8:37:56 PM5/22/12
to coreplot...@googlegroups.com
That should work, too.

Eric


On Tuesday, May 22, 2012 9:42:46 AM UTC-4, Giampaolo Trapasso wrote:
Thank you for your reply. I'm going to follow it. But a question more arises: why this code does not do what i'm looking for?

for (CPTPlotSpaceAnnotation *a in _masterPlot.annotations) {

                [a.contentLayer setHidden:YES];


I would like to understand a bit more about plot space annotation class.


gp



2012/5/11 Eric <esk...@mac.com>
No. Reload once to remove the labels and again to put them back.

Eric


On Friday, May 11, 2012 11:08:53 AM UTC-4, Giampaolo Trapasso wrote:
Hi to all,
i would like to hide labels during an animation of a plot. I thought that I could use a flag "animationIsRunning" and use it in 

-(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex: (NSUInteger)index 

to return labels when flag is false and return nil when flag is true, forcing a reload of data. Is there a different (may be more elegant) solutions?

Thank you in advance.

Giampaolo

--
You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coreplot-discuss/-/WXsbwlPE3moJ.

To post to this group, send email to coreplot-discuss@googlegroups.com.
To unsubscribe from this group, send email to coreplot-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages