Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to increase the gap between plotsymbol and plotsymboltext in line chart?
    primarykey
    data
    text
    <p>I am drawing graph using core-plot framework and i am displaying text when user tap on polt-symbols. But my problem is, text is overlapping on the plot-symbol. How to over come this problem.Please help me.</p> <p><img src="https://i.stack.imgur.com/Jjtry.png" alt="enter image description here"> </p> <p>and my code is like this</p> <pre><code>- (void) scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index{ if ([plot.identifier isEqual:@"Green Plot"]) { selectedLineIndex1 = index; selectedLineIndex2 = -1; [graph reloadData]; } else if ([plot.identifier isEqual:@"Blue Plot"]) { selectedLineIndex1 = -1; selectedLineIndex2 = index; [graph reloadData]; </code></pre> <p>} }</p> <pre><code>- (CPTLayer *) dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index { // Setup a style for the annotation text CPTMutableTextStyle *hitAnnotationTextStyle = [CPTMutableTextStyle textStyle]; hitAnnotationTextStyle.color = [CPTColor blackColor]; hitAnnotationTextStyle.fontSize = 18.0f; hitAnnotationTextStyle.fontName = @"Verdana-Bold"; // Now add the annotation text to the plot CPTTextLayer *selectedText = [CPTTextLayer layer]; selectedText.textStyle = hitAnnotationTextStyle; selectedText.position = CGPointMake(0.0,40.0f); if (index == selectedLineIndex1 &amp;&amp; [plot.identifier isEqual:@"Green Plot"]) { selectedText.text = [NSString stringWithFormat:@"%.1f",[[dataForPlot objectAtIndex:index] floatValue]]; } else if (index == selectedLineIndex2 &amp;&amp; [plot.identifier isEqual:@"Blue Plot"]) { selectedText.text = [NSString stringWithFormat:@"%.1f",[[yPoints objectAtIndex:index] floatValue]]; } return selectedText;} </code></pre> <p>is there any mistake tell me or is there any other way just suggest me please provide some samples.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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