verticalLineAtPosition customizability


I would like to modify the functionality of verticalLineAtPosition to do 2 things:

  1.  Instead of a solid line, draw a dashed line

  2.  Have the line stop the yValue of the data point as I am drawing the line only at positions of data points (ie.  I don’t want it to span the entire yAxis)

Is there a way to accomplish this with this function or do I need to create my own annotation and add it to the chart?


Hi tdxmjl2929,

  1. This currently isn’t a supported feature straight out of the box. You would have to create a dashed view and add it as a subview to your vertical line annotation.

  2. This is also not a feature supported straight out the box. However, it could be implemented in the SChartDelegate method “sChartRenderFinished:”. Here you can access each of your annotation’s frame by looping through the array returned when calling “getAnnotations” on your chart. You can now tweak your annotations frame using the pixel position of the corresponding datapoint. 

Let me know if you have any questions.

Kind Regards,
Andrew Polkinghorn