{"action":"created","issue":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/1474","repository_url":"https://api.github.com/repos/danielgindi/Charts","labels_url":"https://api.github.com/repos/danielgindi/Charts/issues/1474/labels{/name}","comments_url":"https://api.github.com/repos/danielgindi/Charts/issues/1474/comments","events_url":"https://api.github.com/repos/danielgindi/Charts/issues/1474/events","html_url":"https://github.com/danielgindi/Charts/issues/1474","id":177725189,"number":1474,"title":"************* Migrating to Charts 3.0 ********************","user":{"login":"danielgindi","id":366926,"avatar_url":"https://avatars.githubusercontent.com/u/366926?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgindi","html_url":"https://github.com/danielgindi","followers_url":"https://api.github.com/users/danielgindi/followers","following_url":"https://api.github.com/users/danielgindi/following{/other_user}","gists_url":"https://api.github.com/users/danielgindi/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgindi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgindi/subscriptions","organizations_url":"https://api.github.com/users/danielgindi/orgs","repos_url":"https://api.github.com/users/danielgindi/repos","events_url":"https://api.github.com/users/danielgindi/events{/privacy}","received_events_url":"https://api.github.com/users/danielgindi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2016-09-19T08:08:24Z","updated_at":"2016-09-28T23:51:43Z","closed_at":null,"body":"Many have asked about how to migrate to Charts 3.0. So everything will be in the release notes soon as there will be a release, but I will write those down here for now:\r\n\r\n-----\r\n\r\nThis is a major release, with a few breaking changes. So please pay attention.\r\n\r\nUpdates:\r\n* `x-index`es are dead. Intoducing: x-values. Each entry now has an `x` and a `y`.\r\n* Pie/radar charts do not have a concept of X index anymore\r\n* Unified XAxis/YAxis features and experience.\r\n* Unified formatter interfaces for axes.\r\n* New formatter for `y` values, not inheriting from NSNumberFormatter anymore, to have dataSet and viewport information to take better formatting decisions.\r\n* Major refactoring of the Highlight mechanism.\r\n* Refactored marker mechanism\r\n* Refactored legend entry mechanism\r\n* Each dataset can now set its own legend form/size/etc.\r\n* More demos\r\n* Some classes have been renamed, keeping the namespaced name only in ObjC (using Swift 2.2 `objc(...)` feature, and the change of a major version update)\r\n* `FillFormatter` now has a block representation using `FillFormatter.withblock(...)`\r\n* No more `saveToCameraRoll()`. Since Xcode 8.0 it causes \"privacy\" issues with Apple Review, you have to add the photo albums privacy key to your `Info.plist` for that.\r\n* Moved to Swift 3.0. Make sure your project conforms to Swift 3.0.\r\n* Many minor bug fixes and improvements\r\n\r\nBreaking changes / how to migrate:\r\n* All dataset constructors have changed - they do not take an array of x-indices anymore.\r\n* All entry constructors have changed - they take in an X and a Y.\r\n* Pie and Radar chart entries now have their own classes. So exchange the Entry classes with`PieChartDataEntry`/`RadarChartDataEntry`\r\n* If you have any old `startAtZeroEnabled` calls - these have been deprecated for a long time. Replace them with `axisMinimum`.\r\n* If you are using formatters:\r\n   * Replace any `chart.valueFormatter = formatter` with `chart.valueFormatter = ChartDefaultValueFormatter(formatter: formatter)` or `chart.valueFormatter = [[ChartDefaultValueFormatter alloc] initWithFormatter:formatter];`\r\n  * Replace any `axis.valueFormatter = formatter` with `axis.valueFormatter = ChartDefaultAxisValueFormatter(formatter: formatter)` or `axis.valueFormatter = [[ChartDefaultAxisValueFormatter alloc] initWithFormatter:formatter];`\r\n* In general, all functions that accepted x-indices before, now accept an x-value, so you might have to adjust the names a little bit.\r\n* Where `ChartViewDelegate` is implemented, update the `chartValueSelected` interface\r\n* Replace `drawSliceTextEnabled` with `drawEntryLabelsEnabled`\r\n* If you have a custom scatter shape - implement an `IShapeRenderer`, and put your rendering code in there\r\n* If you have a custom marker - consider subclassing `MarkerView`/`MarkerImage` or implementing `IMarker`. There are more options than before now...\r\n* If you have used `barSpace` before, move to using `barWidth`\r\n* If you used `saveToCameraRoll()`, replace with         `UIImageWriteToSavedPhotosAlbum(chart.getChartImage(trasparent: false), nil, nil, nil)`\r\n* Some classes have been renamed for a cleaner look. They do not contain the \"Chart\" prefix anymore. That's for Swift only, where there are namespaces. In ObjC the names stayed the same for the sake of namespacing, using Swift 2.2's feature of `@objc(name)`. If your compiler yells that a class does not exist, try to remove the Chart from its name. This should rarely happen, as we've chosen only the classes that are rarely instantiated by the user.\r\n"},"comment":{"url":"https://api.github.com/repos/danielgindi/Charts/issues/comments/250334571","html_url":"https://github.com/danielgindi/Charts/issues/1474#issuecomment-250334571","issue_url":"https://api.github.com/repos/danielgindi/Charts/issues/1474","id":250334571,"user":{"login":"fuxx","id":265773,"avatar_url":"https://avatars.githubusercontent.com/u/265773?v=3","gravatar_id":"","url":"https://api.github.com/users/fuxx","html_url":"https://github.com/fuxx","followers_url":"https://api.github.com/users/fuxx/followers","following_url":"https://api.github.com/users/fuxx/following{/other_user}","gists_url":"https://api.github.com/users/fuxx/gists{/gist_id}","starred_url":"https://api.github.com/users/fuxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuxx/subscriptions","organizations_url":"https://api.github.com/users/fuxx/orgs","repos_url":"https://api.github.com/users/fuxx/repos","events_url":"https://api.github.com/users/fuxx/events{/privacy}","received_events_url":"https://api.github.com/users/fuxx/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T23:51:43Z","updated_at":"2016-09-28T23:51:43Z","body":"@petester42 Iam providing a framework pod which has a dependency in the pod spec to Charts. Unfortunately you can not point to other repository or branches in pod specs like in Pod files. I could overwrite my Podfile for my example project, but this is not distributable. So i am locked for now to Swift 2.2. But thanks for the tip :)"}}
{"actor":{"display_login":"fuxx"}}