Single straight line corresponding to the y axis


#1

I have an existing graph that plots the y axis against specifc days on the x-axis as a line chart . In addition to this graph , I also need to add another line graph which would basically be one horizontal line spanning through my entire x-axis. i.e same y axis values for all the ticks on the x-axis. Any pointers on how to go about adding this second simple line graph to my existing graph chart ?


#2

Hi. Thanks for getting in touch. May I please ask, are you using Android or iOS?
Thanks,
Kai.


#3

I am looking for an iOS implementation


#4

Hi sim777,

You should be able to specify in your datasource that you have two series (numberOfSeriesInSChart:) and then for the second series, you can return a line series (sChart:seriesAtIndex:), which you then give all the same y-values in your datapoint-source (sChart:dataPointAtIndex:forSeriesAtIndex:).

Hope this helps!
Rob


#5

Thank you . That worked for me