{"action":"created","issue":{"url":"https://api.github.com/repos/core-plot/core-plot/issues/168","labels_url":"https://api.github.com/repos/core-plot/core-plot/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/core-plot/core-plot/issues/168/comments","events_url":"https://api.github.com/repos/core-plot/core-plot/issues/168/events","html_url":"https://github.com/core-plot/core-plot/issues/168","id":68713256,"number":168,"title":"CPTLegendDelegate for wasSelectedAtIndex, touchUpAtIndex methods always return index = 0","user":{"login":"S2V","id":5613351,"avatar_url":"https://avatars.githubusercontent.com/u/5613351?v=3","gravatar_id":"","url":"https://api.github.com/users/S2V","html_url":"https://github.com/S2V","followers_url":"https://api.github.com/users/S2V/followers","following_url":"https://api.github.com/users/S2V/following{/other_user}","gists_url":"https://api.github.com/users/S2V/gists{/gist_id}","starred_url":"https://api.github.com/users/S2V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/S2V/subscriptions","organizations_url":"https://api.github.com/users/S2V/orgs","repos_url":"https://api.github.com/users/S2V/repos","events_url":"https://api.github.com/users/S2V/events{/privacy}","received_events_url":"https://api.github.com/users/S2V/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-15T15:28:47Z","updated_at":"2015-04-29T01:52:02Z","closed_at":null,"body":"Code for example:\r\n```objective-c\r\n CPTLegend *theLegend = [CPTLegend legendWithPlots:self.plots];\r\n    float legendTextSize = 12.0f;\r\n    theLegend.cornerRadius    = legendTextSize * CPTFloat(0.25);\r\n    theLegend.swatchSize      = CGSizeMake( legendTextSize, legendTextSize);\r\n    theLegend.textStyle       = [self textStyleForLegend];;\r\n    theLegend.rowMargin       = legendTextSize * CPTFloat(0.25);\r\n    \r\n    theLegend.paddingLeft   = legendTextSize * CPTFloat(0.375);\r\n    theLegend.paddingTop    = legendTextSize * CPTFloat(0.375);\r\n    theLegend.paddingRight  = legendTextSize * CPTFloat(0.375);\r\n    theLegend.paddingBottom = legendTextSize * CPTFloat(0.375);\r\n    theLegend.delegate = self;\r\n    self.graph.plotAreaFrame.paddingBottom = 18.0f*3    \r\n    self.graph.legendAnchor           = CPTRectAnchorBottom;\r\n    self.graph.legendDisplacement = CGPointMake(10.0, 10.0);\r\n    [self.graph setLegend:theLegend];;\r\n```"},"comment":{"url":"https://api.github.com/repos/core-plot/core-plot/issues/comments/97282214","html_url":"https://github.com/core-plot/core-plot/issues/168#issuecomment-97282214","issue_url":"https://api.github.com/repos/core-plot/core-plot/issues/168","id":97282214,"user":{"login":"eskroch","id":1934470,"avatar_url":"https://avatars.githubusercontent.com/u/1934470?v=3","gravatar_id":"","url":"https://api.github.com/users/eskroch","html_url":"https://github.com/eskroch","followers_url":"https://api.github.com/users/eskroch/followers","following_url":"https://api.github.com/users/eskroch/following{/other_user}","gists_url":"https://api.github.com/users/eskroch/gists{/gist_id}","starred_url":"https://api.github.com/users/eskroch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eskroch/subscriptions","organizations_url":"https://api.github.com/users/eskroch/orgs","repos_url":"https://api.github.com/users/eskroch/repos","events_url":"https://api.github.com/users/eskroch/events{/privacy}","received_events_url":"https://api.github.com/users/eskroch/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T01:52:02Z","updated_at":"2015-04-29T01:52:02Z","body":"How many legend entries are displayed for each plot? I ask because it can vary based on the plot type. For example, pie charts have a legend entry for each pie slice. Scatter plots only have one entry for the plot. Bar plots can have one entry for the plot or one entry for each bar, depending on how you set it up."}}