Note that there are some explanatory texts on larger screens.

plurals
  1. POCore-plot Question : How to add a data Indicator
    primarykey
    data
    text
    <p>i want to add a data indicator line similar to the following image in core-plot.</p> <p><a href="http://img203.imageshack.us/img203/9412/plota.png" rel="noreferrer">Plot Image http://img203.imageshack.us/img203/9412/plota.png</a></p> <p>Any idea how i can achieve this using core-plot. I have just started to understand core-plot, so any tip will be very useful.</p> <p>Thanks </p> <p><strong>Edit :</strong></p> <p>For better understanding i have created a screencast to show what i mean :</p> <p><a href="http://www.screencast.com/users/GauravVerma/folders/Jing/media/78fbef04-8785-46d6-9347-4f35d257109c" rel="noreferrer">http://www.screencast.com/users/GauravVerma/folders/Jing/media/78fbef04-8785-46d6-9347-4f35d257109c</a></p> <p><strong>Added on 26th Feb :</strong></p> <p>I have solved partial problem by using two dataplots. here is the current implementation :</p> <p><a href="http://www.screencast.com/users/GauravVerma/folders/Jing/media/02a1e685-8bf8-41a9-aaa6-5ea6445f6a6c" rel="noreferrer">http://www.screencast.com/users/GauravVerma/folders/Jing/media/02a1e685-8bf8-41a9-aaa6-5ea6445f6a6c</a></p> <p>I have used two dataplots, one is the main one &amp; other one plots only one data point which is reloaded when slider value changes.</p> <p>Here are my Datasource methods (may help somebody):</p> <pre><code>-(NSUInteger)numberOfRecordsForPlot:(CPPlot *)plot { if ([(NSString *)plot.identifier isEqualToString:@"Blue Plot"]){ return [dataForPlot count]; }else { return 1; } } -(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index { if ([(NSString *)plot.identifier isEqualToString:@"Green Plot"]) { index = floor((double)[slider value]); if (index &gt; [dataForPlot count] -1) { index = [dataForPlot count] -1; } NSLog(@"Green plot index : %f",index); } NSNumber *num = [[dataForPlot objectAtIndex:index] valueForKey:(fieldEnum == CPScatterPlotFieldX ? @"x" : @"y")]; num = [NSNumber numberWithDouble:[num doubleValue] + 1.0]; return num; } </code></pre> <p><strong><em>Now only problem remains is to find out a easy way to draw the line. Any Ideas ??</em></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload