Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
CGPoint value of given data points
posted

Hi all...

I want to use custom labels. I will implement my own labels. But i have to know point values of my data array. For example my line series data source;

        categorySource = [[IGCategorySeriesDataSourceHelper alloc] init];

        categorySource.values = dataArray;

        categorySource.labels=labelArray;

        

After chart drawn i want to get CGPoint value of specific data array rows. For example i need the x coordinate of fifth element of my array. So i can put my custom label at that x coordinate under x axis.


Parents
  • 26458
    Offline posted

    Hi,

    The chart view allows you to specify custom labels at render time by using -labelForAxis delegate method. The chart view doesn't exactly deal in CGPoints when it comes to labels. It's more like it tells you what the current label is for a given data point and gives you an option to change it to another string.

    I'm attaching a sample that places a custom label at index 5.

    CustomLabelAxis.zip
Reply Children