├── .editorconfig ├── .gitignore ├── Example └── PieChartExample │ ├── PieChartExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── PieChartExample.xcscheme │ ├── iOS │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── main.jsbundle │ └── main.m │ ├── index.ios.js │ └── package.json ├── LICENSE ├── README.md ├── RNPieChart.android.js ├── RNPieChart.h ├── RNPieChart.ios.js ├── RNPieChart.m ├── RNPieChart.xcodeproj └── project.pbxproj ├── RNPieChartManager.h ├── RNPieChartManager.m └── package.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | [*.js] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.json] 14 | indent_style = space 15 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### OSX ### 2 | .DS_Store 3 | .AppleDouble 4 | .LSOverride 5 | Icon 6 | 7 | # Thumbnails 8 | ._* 9 | 10 | # Files that might appear on external disk 11 | .Spotlight-V100 12 | .Trashes 13 | 14 | # Node.js 15 | node_modules 16 | 17 | # Webstorm 18 | .idea 19 | 20 | # Xcode 21 | platform-ios/*/data 22 | platform-ios/*/dist 23 | build/ 24 | *.pbxuser 25 | !default.pbxuser 26 | *.mode1v3 27 | !default.mode1v3 28 | *.mode2v3 29 | !default.mode2v3 30 | *.perspectivev3 31 | !default.perspectivev3 32 | *.xcworkspace 33 | !default.xcworkspace 34 | xcuserdata 35 | profile 36 | *.moved-aside 37 | DerivedData 38 | .idea/ 39 | -------------------------------------------------------------------------------- /Example/PieChartExample/PieChartExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */; }; 11 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 12 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 13 | 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; }; 14 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 15 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 16 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 17 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 18 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 3BFE9D301AFD8EB2005C939D /* libRNPieChart.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BFE9D2F1AFD8DB2005C939D /* libRNPieChart.a */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 34 | remoteInfo = RCTWebSocketDebugger; 35 | }; 36 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 39 | proxyType = 2; 40 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 41 | remoteInfo = RCTActionSheet; 42 | }; 43 | 00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 48 | remoteInfo = RCTAdSupport; 49 | }; 50 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 55 | remoteInfo = RCTGeolocation; 56 | }; 57 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 62 | remoteInfo = RCTImage; 63 | }; 64 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 67 | proxyType = 2; 68 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 69 | remoteInfo = RCTNetwork; 70 | }; 71 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 74 | proxyType = 2; 75 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 76 | remoteInfo = RCTVibration; 77 | }; 78 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 79 | isa = PBXContainerItemProxy; 80 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 81 | proxyType = 2; 82 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 83 | remoteInfo = React; 84 | }; 85 | 3BFE9D2E1AFD8DB2005C939D /* PBXContainerItemProxy */ = { 86 | isa = PBXContainerItemProxy; 87 | containerPortal = 3BFE9D201AFD8DB1005C939D /* RNPieChart.xcodeproj */; 88 | proxyType = 2; 89 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 90 | remoteInfo = RNPieChart; 91 | }; 92 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 95 | proxyType = 2; 96 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 97 | remoteInfo = RCTLinking; 98 | }; 99 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 102 | proxyType = 2; 103 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 104 | remoteInfo = RCTText; 105 | }; 106 | /* End PBXContainerItemProxy section */ 107 | 108 | /* Begin PBXFileReference section */ 109 | 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocketDebugger.xcodeproj; path = "node_modules/react-native/Libraries/RCTWebSocketDebugger/RCTWebSocketDebugger.xcodeproj"; sourceTree = ""; }; 110 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; }; 111 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 112 | 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = ""; }; 113 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 114 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 115 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 116 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 117 | 13B07F961A680F5B00A75B9A /* PieChartExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PieChartExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 118 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; }; 119 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; }; 120 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 121 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; }; 122 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; }; 123 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; }; 124 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 125 | 3BFE9D201AFD8DB1005C939D /* RNPieChart.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNPieChart.xcodeproj; path = ../../RNPieChart.xcodeproj; sourceTree = ""; }; 126 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 127 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 128 | /* End PBXFileReference section */ 129 | 130 | /* Begin PBXFrameworksBuildPhase section */ 131 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 132 | isa = PBXFrameworksBuildPhase; 133 | buildActionMask = 2147483647; 134 | files = ( 135 | 3BFE9D301AFD8EB2005C939D /* libRNPieChart.a in Frameworks */, 136 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 137 | 00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */, 138 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 139 | 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */, 140 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 141 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 142 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 143 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 144 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 145 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXFrameworksBuildPhase section */ 150 | 151 | /* Begin PBXGroup section */ 152 | 00481BDC1AC0C7FA00671115 /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */, 156 | ); 157 | name = Products; 158 | sourceTree = ""; 159 | }; 160 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 164 | ); 165 | name = Products; 166 | sourceTree = ""; 167 | }; 168 | 00C302B01ABCB8E700DB3ED1 /* Products */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */, 172 | ); 173 | name = Products; 174 | sourceTree = ""; 175 | }; 176 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 180 | ); 181 | name = Products; 182 | sourceTree = ""; 183 | }; 184 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 188 | ); 189 | name = Products; 190 | sourceTree = ""; 191 | }; 192 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 196 | ); 197 | name = Products; 198 | sourceTree = ""; 199 | }; 200 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 204 | ); 205 | name = Products; 206 | sourceTree = ""; 207 | }; 208 | 13B07FAE1A68108700A75B9A /* PieChartExample */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 212 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 213 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 214 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 215 | 13B07FB61A68108700A75B9A /* Info.plist */, 216 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 217 | 13B07FB71A68108700A75B9A /* main.m */, 218 | ); 219 | name = PieChartExample; 220 | sourceTree = ""; 221 | }; 222 | 146834001AC3E56700842450 /* Products */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 146834041AC3E56700842450 /* libReact.a */, 226 | ); 227 | name = Products; 228 | sourceTree = ""; 229 | }; 230 | 3BFE9D211AFD8DB1005C939D /* Products */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 3BFE9D2F1AFD8DB2005C939D /* libRNPieChart.a */, 234 | ); 235 | name = Products; 236 | sourceTree = ""; 237 | }; 238 | 78C398B11ACF4ADC00677621 /* Products */ = { 239 | isa = PBXGroup; 240 | children = ( 241 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 242 | ); 243 | name = Products; 244 | sourceTree = ""; 245 | }; 246 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | 3BFE9D201AFD8DB1005C939D /* RNPieChart.xcodeproj */, 250 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 251 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 252 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 253 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 254 | 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */, 255 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 256 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 257 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 258 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 259 | 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */, 260 | ); 261 | name = Libraries; 262 | sourceTree = ""; 263 | }; 264 | 832341B11AAA6A8300B99B32 /* Products */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 268 | ); 269 | name = Products; 270 | sourceTree = ""; 271 | }; 272 | 83CBB9F61A601CBA00E9B192 = { 273 | isa = PBXGroup; 274 | children = ( 275 | 13B07FAE1A68108700A75B9A /* PieChartExample */, 276 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 277 | 83CBBA001A601CBA00E9B192 /* Products */, 278 | ); 279 | indentWidth = 2; 280 | sourceTree = ""; 281 | tabWidth = 2; 282 | }; 283 | 83CBBA001A601CBA00E9B192 /* Products */ = { 284 | isa = PBXGroup; 285 | children = ( 286 | 13B07F961A680F5B00A75B9A /* PieChartExample.app */, 287 | ); 288 | name = Products; 289 | sourceTree = ""; 290 | }; 291 | /* End PBXGroup section */ 292 | 293 | /* Begin PBXNativeTarget section */ 294 | 13B07F861A680F5B00A75B9A /* PieChartExample */ = { 295 | isa = PBXNativeTarget; 296 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PieChartExample" */; 297 | buildPhases = ( 298 | 13B07F871A680F5B00A75B9A /* Sources */, 299 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 300 | 13B07F8E1A680F5B00A75B9A /* Resources */, 301 | ); 302 | buildRules = ( 303 | ); 304 | dependencies = ( 305 | ); 306 | name = PieChartExample; 307 | productName = "Hello World"; 308 | productReference = 13B07F961A680F5B00A75B9A /* PieChartExample.app */; 309 | productType = "com.apple.product-type.application"; 310 | }; 311 | /* End PBXNativeTarget section */ 312 | 313 | /* Begin PBXProject section */ 314 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 315 | isa = PBXProject; 316 | attributes = { 317 | LastUpgradeCheck = 0610; 318 | ORGANIZATIONNAME = Facebook; 319 | }; 320 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PieChartExample" */; 321 | compatibilityVersion = "Xcode 3.2"; 322 | developmentRegion = English; 323 | hasScannedForEncodings = 0; 324 | knownRegions = ( 325 | en, 326 | Base, 327 | ); 328 | mainGroup = 83CBB9F61A601CBA00E9B192; 329 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 330 | projectDirPath = ""; 331 | projectReferences = ( 332 | { 333 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 334 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 335 | }, 336 | { 337 | ProductGroup = 00C302B01ABCB8E700DB3ED1 /* Products */; 338 | ProjectRef = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */; 339 | }, 340 | { 341 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 342 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 343 | }, 344 | { 345 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 346 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 347 | }, 348 | { 349 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 350 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 351 | }, 352 | { 353 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 354 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 355 | }, 356 | { 357 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 358 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 359 | }, 360 | { 361 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 362 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 363 | }, 364 | { 365 | ProductGroup = 00481BDC1AC0C7FA00671115 /* Products */; 366 | ProjectRef = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */; 367 | }, 368 | { 369 | ProductGroup = 146834001AC3E56700842450 /* Products */; 370 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 371 | }, 372 | { 373 | ProductGroup = 3BFE9D211AFD8DB1005C939D /* Products */; 374 | ProjectRef = 3BFE9D201AFD8DB1005C939D /* RNPieChart.xcodeproj */; 375 | }, 376 | ); 377 | projectRoot = ""; 378 | targets = ( 379 | 13B07F861A680F5B00A75B9A /* PieChartExample */, 380 | ); 381 | }; 382 | /* End PBXProject section */ 383 | 384 | /* Begin PBXReferenceProxy section */ 385 | 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */ = { 386 | isa = PBXReferenceProxy; 387 | fileType = archive.ar; 388 | path = libRCTWebSocketDebugger.a; 389 | remoteRef = 00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */; 390 | sourceTree = BUILT_PRODUCTS_DIR; 391 | }; 392 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 393 | isa = PBXReferenceProxy; 394 | fileType = archive.ar; 395 | path = libRCTActionSheet.a; 396 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 397 | sourceTree = BUILT_PRODUCTS_DIR; 398 | }; 399 | 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */ = { 400 | isa = PBXReferenceProxy; 401 | fileType = archive.ar; 402 | path = libRCTAdSupport.a; 403 | remoteRef = 00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */; 404 | sourceTree = BUILT_PRODUCTS_DIR; 405 | }; 406 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 407 | isa = PBXReferenceProxy; 408 | fileType = archive.ar; 409 | path = libRCTGeolocation.a; 410 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 411 | sourceTree = BUILT_PRODUCTS_DIR; 412 | }; 413 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 414 | isa = PBXReferenceProxy; 415 | fileType = archive.ar; 416 | path = libRCTImage.a; 417 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 418 | sourceTree = BUILT_PRODUCTS_DIR; 419 | }; 420 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 421 | isa = PBXReferenceProxy; 422 | fileType = archive.ar; 423 | path = libRCTNetwork.a; 424 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 425 | sourceTree = BUILT_PRODUCTS_DIR; 426 | }; 427 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 428 | isa = PBXReferenceProxy; 429 | fileType = archive.ar; 430 | path = libRCTVibration.a; 431 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 432 | sourceTree = BUILT_PRODUCTS_DIR; 433 | }; 434 | 146834041AC3E56700842450 /* libReact.a */ = { 435 | isa = PBXReferenceProxy; 436 | fileType = archive.ar; 437 | path = libReact.a; 438 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 439 | sourceTree = BUILT_PRODUCTS_DIR; 440 | }; 441 | 3BFE9D2F1AFD8DB2005C939D /* libRNPieChart.a */ = { 442 | isa = PBXReferenceProxy; 443 | fileType = archive.ar; 444 | path = libRNPieChart.a; 445 | remoteRef = 3BFE9D2E1AFD8DB2005C939D /* PBXContainerItemProxy */; 446 | sourceTree = BUILT_PRODUCTS_DIR; 447 | }; 448 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 449 | isa = PBXReferenceProxy; 450 | fileType = archive.ar; 451 | path = libRCTLinking.a; 452 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 453 | sourceTree = BUILT_PRODUCTS_DIR; 454 | }; 455 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 456 | isa = PBXReferenceProxy; 457 | fileType = archive.ar; 458 | path = libRCTText.a; 459 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 460 | sourceTree = BUILT_PRODUCTS_DIR; 461 | }; 462 | /* End PBXReferenceProxy section */ 463 | 464 | /* Begin PBXResourcesBuildPhase section */ 465 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 466 | isa = PBXResourcesBuildPhase; 467 | buildActionMask = 2147483647; 468 | files = ( 469 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 470 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 471 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 472 | ); 473 | runOnlyForDeploymentPostprocessing = 0; 474 | }; 475 | /* End PBXResourcesBuildPhase section */ 476 | 477 | /* Begin PBXSourcesBuildPhase section */ 478 | 13B07F871A680F5B00A75B9A /* Sources */ = { 479 | isa = PBXSourcesBuildPhase; 480 | buildActionMask = 2147483647; 481 | files = ( 482 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 483 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 484 | ); 485 | runOnlyForDeploymentPostprocessing = 0; 486 | }; 487 | /* End PBXSourcesBuildPhase section */ 488 | 489 | /* Begin PBXVariantGroup section */ 490 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 491 | isa = PBXVariantGroup; 492 | children = ( 493 | 13B07FB21A68108700A75B9A /* Base */, 494 | ); 495 | name = LaunchScreen.xib; 496 | path = iOS; 497 | sourceTree = ""; 498 | }; 499 | /* End PBXVariantGroup section */ 500 | 501 | /* Begin XCBuildConfiguration section */ 502 | 13B07F941A680F5B00A75B9A /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | buildSettings = { 505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 506 | HEADER_SEARCH_PATHS = ( 507 | "$(inherited)", 508 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 509 | "$(SRCROOT)/node_modules/react-native/React/**", 510 | ); 511 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist"; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 513 | OTHER_LDFLAGS = "-ObjC"; 514 | PRODUCT_NAME = PieChartExample; 515 | }; 516 | name = Debug; 517 | }; 518 | 13B07F951A680F5B00A75B9A /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 522 | HEADER_SEARCH_PATHS = ( 523 | "$(inherited)", 524 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 525 | "$(SRCROOT)/node_modules/react-native/React/**", 526 | ); 527 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist"; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 529 | OTHER_LDFLAGS = "-ObjC"; 530 | PRODUCT_NAME = PieChartExample; 531 | }; 532 | name = Release; 533 | }; 534 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_SEARCH_USER_PATHS = NO; 538 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 539 | CLANG_CXX_LIBRARY = "libc++"; 540 | CLANG_ENABLE_MODULES = YES; 541 | CLANG_ENABLE_OBJC_ARC = YES; 542 | CLANG_WARN_BOOL_CONVERSION = YES; 543 | CLANG_WARN_CONSTANT_CONVERSION = YES; 544 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 545 | CLANG_WARN_EMPTY_BODY = YES; 546 | CLANG_WARN_ENUM_CONVERSION = YES; 547 | CLANG_WARN_INT_CONVERSION = YES; 548 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 549 | CLANG_WARN_UNREACHABLE_CODE = YES; 550 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 551 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 552 | COPY_PHASE_STRIP = NO; 553 | ENABLE_STRICT_OBJC_MSGSEND = YES; 554 | GCC_C_LANGUAGE_STANDARD = gnu99; 555 | GCC_DYNAMIC_NO_PIC = NO; 556 | GCC_OPTIMIZATION_LEVEL = 0; 557 | GCC_PREPROCESSOR_DEFINITIONS = ( 558 | "DEBUG=1", 559 | "$(inherited)", 560 | ); 561 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 562 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 563 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 564 | GCC_WARN_UNDECLARED_SELECTOR = YES; 565 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 566 | GCC_WARN_UNUSED_FUNCTION = YES; 567 | GCC_WARN_UNUSED_VARIABLE = YES; 568 | HEADER_SEARCH_PATHS = ( 569 | "$(inherited)", 570 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 571 | "$(SRCROOT)/node_modules/react-native/React/**", 572 | ); 573 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 574 | MTL_ENABLE_DEBUG_INFO = YES; 575 | ONLY_ACTIVE_ARCH = YES; 576 | SDKROOT = iphoneos; 577 | }; 578 | name = Debug; 579 | }; 580 | 83CBBA211A601CBA00E9B192 /* Release */ = { 581 | isa = XCBuildConfiguration; 582 | buildSettings = { 583 | ALWAYS_SEARCH_USER_PATHS = NO; 584 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 585 | CLANG_CXX_LIBRARY = "libc++"; 586 | CLANG_ENABLE_MODULES = YES; 587 | CLANG_ENABLE_OBJC_ARC = YES; 588 | CLANG_WARN_BOOL_CONVERSION = YES; 589 | CLANG_WARN_CONSTANT_CONVERSION = YES; 590 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 591 | CLANG_WARN_EMPTY_BODY = YES; 592 | CLANG_WARN_ENUM_CONVERSION = YES; 593 | CLANG_WARN_INT_CONVERSION = YES; 594 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 595 | CLANG_WARN_UNREACHABLE_CODE = YES; 596 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 597 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 598 | COPY_PHASE_STRIP = YES; 599 | ENABLE_NS_ASSERTIONS = NO; 600 | ENABLE_STRICT_OBJC_MSGSEND = YES; 601 | GCC_C_LANGUAGE_STANDARD = gnu99; 602 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 603 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 604 | GCC_WARN_UNDECLARED_SELECTOR = YES; 605 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 606 | GCC_WARN_UNUSED_FUNCTION = YES; 607 | GCC_WARN_UNUSED_VARIABLE = YES; 608 | HEADER_SEARCH_PATHS = ( 609 | "$(inherited)", 610 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 611 | "$(SRCROOT)/node_modules/react-native/React/**", 612 | ); 613 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 614 | MTL_ENABLE_DEBUG_INFO = NO; 615 | SDKROOT = iphoneos; 616 | VALIDATE_PRODUCT = YES; 617 | }; 618 | name = Release; 619 | }; 620 | /* End XCBuildConfiguration section */ 621 | 622 | /* Begin XCConfigurationList section */ 623 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PieChartExample" */ = { 624 | isa = XCConfigurationList; 625 | buildConfigurations = ( 626 | 13B07F941A680F5B00A75B9A /* Debug */, 627 | 13B07F951A680F5B00A75B9A /* Release */, 628 | ); 629 | defaultConfigurationIsVisible = 0; 630 | defaultConfigurationName = Release; 631 | }; 632 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PieChartExample" */ = { 633 | isa = XCConfigurationList; 634 | buildConfigurations = ( 635 | 83CBBA201A601CBA00E9B192 /* Debug */, 636 | 83CBBA211A601CBA00E9B192 /* Release */, 637 | ); 638 | defaultConfigurationIsVisible = 0; 639 | defaultConfigurationName = Release; 640 | }; 641 | /* End XCConfigurationList section */ 642 | }; 643 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 644 | } 645 | -------------------------------------------------------------------------------- /Example/PieChartExample/PieChartExample.xcodeproj/xcshareddata/xcschemes/PieChartExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | // Loading JavaScript code - uncomment the one you want. 21 | 22 | // OPTION 1 23 | // Load from development server. Start the server from the repository root: 24 | // 25 | // $ npm start 26 | // 27 | // To run on device, change `localhost` to the IP address of your computer, and make sure your computer and 28 | // iOS device are on the same Wi-Fi network. 29 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; 30 | 31 | // OPTION 2 32 | // Load from pre-bundled file on disk. To re-generate the static bundle, run 33 | // 34 | // $ curl 'http://localhost:8081/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle 35 | // 36 | // and uncomment the next following line 37 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 38 | 39 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 40 | moduleName:@"PieChartExample" 41 | launchOptions:launchOptions]; 42 | 43 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 44 | UIViewController *rootViewController = [[UIViewController alloc] init]; 45 | rootViewController.view = rootView; 46 | self.window.rootViewController = rootViewController; 47 | [self.window makeKeyAndVisible]; 48 | return YES; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/main.jsbundle: -------------------------------------------------------------------------------- 1 | // Offline JS 2 | // To re-generate the offline bundle, run this from root of your project 3 | // $ curl 'http://localhost:8081/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle 4 | 5 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); 6 | -------------------------------------------------------------------------------- /Example/PieChartExample/iOS/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/PieChartExample/index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | */ 5 | 'use strict'; 6 | 7 | var React = require('react-native'); 8 | var { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View, 13 | } = React; 14 | 15 | var PieChart = require('react-native-piechart'); 16 | 17 | var PieChartExample = React.createClass({ 18 | render: function() { 19 | return ( 20 | 21 | 22 | Welcome to React Native! 23 | 24 | 25 | To get started, edit index.ios.js 26 | 27 | 28 | 29 | Press Cmd+R to reload,{'\n'} 30 | Cmd+Control+Z for dev menu 31 | 32 | 33 | ); 34 | } 35 | }); 36 | 37 | var styles = StyleSheet.create({ 38 | container: { 39 | flex: 1, 40 | justifyContent: 'center', 41 | alignItems: 'center', 42 | backgroundColor: '#F5FCFF', 43 | }, 44 | welcome: { 45 | fontSize: 20, 46 | textAlign: 'center', 47 | margin: 10, 48 | }, 49 | chart: { 50 | margin: 10, 51 | height: 200, 52 | width: 200 53 | }, 54 | instructions: { 55 | textAlign: 'center', 56 | color: '#333333', 57 | marginBottom: 5, 58 | }, 59 | }); 60 | 61 | AppRegistry.registerComponent('PieChartExample', () => PieChartExample); 62 | -------------------------------------------------------------------------------- /Example/PieChartExample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PieChartExample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node_modules/react-native/packager/packager.sh" 7 | }, 8 | "dependencies": { 9 | "react-native": "^0.4.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-piechart 2 | Pie Chart for React Native 3 | -------------------------------------------------------------------------------- /RNPieChart.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Stub of RNPieChart for Android. 3 | * 4 | * @providesModule RNPieChart 5 | * @flow 6 | */ 7 | 'use strict'; 8 | 9 | var warning = require('warning'); 10 | 11 | var RNPieChart = { 12 | test: function() { 13 | warning("Not yet implemented for Android."); 14 | } 15 | }; 16 | 17 | module.exports = RNPieChart; 18 | -------------------------------------------------------------------------------- /RNPieChart.h: -------------------------------------------------------------------------------- 1 | #import "RCTView.h" 2 | 3 | @interface RNPieChart : RCTView 4 | 5 | @end -------------------------------------------------------------------------------- /RNPieChart.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @providesModule RNPieChart 3 | * @flow 4 | */ 5 | 'use strict'; 6 | 7 | var React = require('React'); 8 | var NativeModules = require('NativeModules'); 9 | var ReactIOSViewAttributes = require('ReactIOSViewAttributes'); 10 | var StyleSheet = require('StyleSheet'); 11 | var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass'); 12 | var PropTypes = require('ReactPropTypes'); 13 | var NativeMethodsMixin = require('NativeMethodsMixin'); 14 | var flattenStyle = require('flattenStyle'); 15 | var merge = require('merge'); 16 | 17 | var PieChart = React.createClass({ 18 | propTypes: { 19 | data: PropTypes.array 20 | }, 21 | mixins: [NativeMethodsMixin], 22 | viewConfig: { 23 | uiViewClassName: 'UIView', 24 | validAttributes: ReactIOSViewAttributes.UIView 25 | }, 26 | render: function () { 27 | var style = flattenStyle([styles.base, this.props.style]); 28 | var nativeProps = merge(this.props, { 29 | style 30 | }); 31 | return 32 | } 33 | }); 34 | 35 | var RNPieChart = createReactIOSNativeComponentClass({ 36 | validAttributes: merge(ReactIOSViewAttributes.UIView, {}), 37 | uiViewClassName: 'RNPieChart' 38 | }); 39 | 40 | var styles = StyleSheet.create({ 41 | base: {} 42 | }); 43 | 44 | module.exports = PieChart; 45 | -------------------------------------------------------------------------------- /RNPieChart.m: -------------------------------------------------------------------------------- 1 | #import "RNPieChart.h" 2 | 3 | @implementation RNPieChart 4 | 5 | - (void)drawRect:(CGRect)rect { 6 | [super drawRect:rect]; 7 | 8 | // Drawing code 9 | /*CGRect bounds = self.bounds; 10 | 11 | CGContextRef context = UIGraphicsGetCurrentContext(); 12 | CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0); 13 | CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0); 14 | CGContextFillRect(context, bounds);*/ 15 | 16 | //prepare 17 | CGContextRef context = UIGraphicsGetCurrentContext(); 18 | CGFloat theHalf = rect.size.width/2; 19 | CGFloat lineWidth = theHalf; 20 | 21 | CGFloat radius = theHalf-lineWidth/2; 22 | 23 | CGFloat centerX = theHalf; 24 | CGFloat centerY = rect.size.height/2; 25 | 26 | //drawing 27 | 28 | double sum = 0.0f; 29 | int slicesCount = 3;//[self.datasource numberOfSlicesInPieChartView:self]; 30 | 31 | for (int i = 0; i < slicesCount; i++) 32 | { 33 | sum += 33.3;//[self.datasource pieChartView:self valueForSliceAtIndex:i]; 34 | } 35 | 36 | float startAngle = - M_PI_2; 37 | float endAngle = 0.0f; 38 | 39 | for (int i = 0; i < slicesCount; i++) 40 | { 41 | double value = 33.3;//[self.datasource pieChartView:self valueForSliceAtIndex:i]; 42 | 43 | endAngle = startAngle + M_PI*2*value/sum; 44 | CGContextAddArc(context, centerX, centerY, radius, startAngle, endAngle, false); 45 | 46 | 47 | 48 | UIColor *drawColor = [UIColor colorWithRed:(0.33 * i) green:0.0 blue:0.0 alpha:1.0]; //[self.datasource pieChartView:self colorForSliceAtIndex:i]; 49 | 50 | CGContextSetStrokeColorWithColor(context, drawColor.CGColor); 51 | CGContextSetLineWidth(context, lineWidth); 52 | CGContextStrokePath(context); 53 | startAngle += M_PI*2*value/sum; 54 | } 55 | } 56 | 57 | @end -------------------------------------------------------------------------------- /RNPieChart.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13BE3DEE1AC21097009241FE /* RNPieChart.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BE3DED1AC21097009241FE /* RNPieChart.m */; }; 11 | 3BFE9D151AFD8B7A005C939D /* RNPieChartManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BFE9D141AFD8B7A005C939D /* RNPieChartManager.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXCopyFilesBuildPhase section */ 15 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 16 | isa = PBXCopyFilesBuildPhase; 17 | buildActionMask = 2147483647; 18 | dstPath = "include/$(PRODUCT_NAME)"; 19 | dstSubfolderSpec = 16; 20 | files = ( 21 | ); 22 | runOnlyForDeploymentPostprocessing = 0; 23 | }; 24 | /* End PBXCopyFilesBuildPhase section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 134814201AA4EA6300B7C361 /* libRNPieChart.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPieChart.a; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 13BE3DEC1AC21097009241FE /* RNPieChart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPieChart.h; sourceTree = ""; }; 29 | 13BE3DED1AC21097009241FE /* RNPieChart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPieChart.m; sourceTree = ""; }; 30 | 3BFE9D131AFD8B7A005C939D /* RNPieChartManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPieChartManager.h; sourceTree = ""; }; 31 | 3BFE9D141AFD8B7A005C939D /* RNPieChartManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPieChartManager.m; sourceTree = ""; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 134814211AA4EA7D00B7C361 /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 134814201AA4EA6300B7C361 /* libRNPieChart.a */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | 58B511D21A9E6C8500147676 = { 54 | isa = PBXGroup; 55 | children = ( 56 | 3BFE9D131AFD8B7A005C939D /* RNPieChartManager.h */, 57 | 3BFE9D141AFD8B7A005C939D /* RNPieChartManager.m */, 58 | 13BE3DEC1AC21097009241FE /* RNPieChart.h */, 59 | 13BE3DED1AC21097009241FE /* RNPieChart.m */, 60 | 134814211AA4EA7D00B7C361 /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | /* End PBXGroup section */ 65 | 66 | /* Begin PBXNativeTarget section */ 67 | 58B511DA1A9E6C8500147676 /* RNPieChart */ = { 68 | isa = PBXNativeTarget; 69 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNPieChart" */; 70 | buildPhases = ( 71 | 58B511D71A9E6C8500147676 /* Sources */, 72 | 58B511D81A9E6C8500147676 /* Frameworks */, 73 | 58B511D91A9E6C8500147676 /* CopyFiles */, 74 | ); 75 | buildRules = ( 76 | ); 77 | dependencies = ( 78 | ); 79 | name = RNPieChart; 80 | productName = RCTDataManager; 81 | productReference = 134814201AA4EA6300B7C361 /* libRNPieChart.a */; 82 | productType = "com.apple.product-type.library.static"; 83 | }; 84 | /* End PBXNativeTarget section */ 85 | 86 | /* Begin PBXProject section */ 87 | 58B511D31A9E6C8500147676 /* Project object */ = { 88 | isa = PBXProject; 89 | attributes = { 90 | LastUpgradeCheck = 0610; 91 | ORGANIZATIONNAME = Facebook; 92 | TargetAttributes = { 93 | 58B511DA1A9E6C8500147676 = { 94 | CreatedOnToolsVersion = 6.1.1; 95 | }; 96 | }; 97 | }; 98 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNPieChart" */; 99 | compatibilityVersion = "Xcode 3.2"; 100 | developmentRegion = English; 101 | hasScannedForEncodings = 0; 102 | knownRegions = ( 103 | en, 104 | ); 105 | mainGroup = 58B511D21A9E6C8500147676; 106 | productRefGroup = 58B511D21A9E6C8500147676; 107 | projectDirPath = ""; 108 | projectRoot = ""; 109 | targets = ( 110 | 58B511DA1A9E6C8500147676 /* RNPieChart */, 111 | ); 112 | }; 113 | /* End PBXProject section */ 114 | 115 | /* Begin PBXSourcesBuildPhase section */ 116 | 58B511D71A9E6C8500147676 /* Sources */ = { 117 | isa = PBXSourcesBuildPhase; 118 | buildActionMask = 2147483647; 119 | files = ( 120 | 13BE3DEE1AC21097009241FE /* RNPieChart.m in Sources */, 121 | 3BFE9D151AFD8B7A005C939D /* RNPieChartManager.m in Sources */, 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | /* End PBXSourcesBuildPhase section */ 126 | 127 | /* Begin XCBuildConfiguration section */ 128 | 58B511ED1A9E6C8500147676 /* Debug */ = { 129 | isa = XCBuildConfiguration; 130 | buildSettings = { 131 | ALWAYS_SEARCH_USER_PATHS = NO; 132 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 133 | CLANG_CXX_LIBRARY = "libc++"; 134 | CLANG_ENABLE_MODULES = YES; 135 | CLANG_ENABLE_OBJC_ARC = YES; 136 | CLANG_WARN_BOOL_CONVERSION = YES; 137 | CLANG_WARN_CONSTANT_CONVERSION = YES; 138 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 139 | CLANG_WARN_EMPTY_BODY = YES; 140 | CLANG_WARN_ENUM_CONVERSION = YES; 141 | CLANG_WARN_INT_CONVERSION = YES; 142 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 143 | CLANG_WARN_UNREACHABLE_CODE = YES; 144 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 145 | COPY_PHASE_STRIP = NO; 146 | ENABLE_STRICT_OBJC_MSGSEND = YES; 147 | GCC_C_LANGUAGE_STANDARD = gnu99; 148 | GCC_DYNAMIC_NO_PIC = NO; 149 | GCC_OPTIMIZATION_LEVEL = 0; 150 | GCC_PREPROCESSOR_DEFINITIONS = ( 151 | "DEBUG=1", 152 | "$(inherited)", 153 | ); 154 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 155 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 156 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 157 | GCC_WARN_UNDECLARED_SELECTOR = YES; 158 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 159 | GCC_WARN_UNUSED_FUNCTION = YES; 160 | GCC_WARN_UNUSED_VARIABLE = YES; 161 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 162 | MTL_ENABLE_DEBUG_INFO = YES; 163 | ONLY_ACTIVE_ARCH = YES; 164 | SDKROOT = iphoneos; 165 | }; 166 | name = Debug; 167 | }; 168 | 58B511EE1A9E6C8500147676 /* Release */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | ALWAYS_SEARCH_USER_PATHS = NO; 172 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 173 | CLANG_CXX_LIBRARY = "libc++"; 174 | CLANG_ENABLE_MODULES = YES; 175 | CLANG_ENABLE_OBJC_ARC = YES; 176 | CLANG_WARN_BOOL_CONVERSION = YES; 177 | CLANG_WARN_CONSTANT_CONVERSION = YES; 178 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 179 | CLANG_WARN_EMPTY_BODY = YES; 180 | CLANG_WARN_ENUM_CONVERSION = YES; 181 | CLANG_WARN_INT_CONVERSION = YES; 182 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 183 | CLANG_WARN_UNREACHABLE_CODE = YES; 184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 185 | COPY_PHASE_STRIP = YES; 186 | ENABLE_NS_ASSERTIONS = NO; 187 | ENABLE_STRICT_OBJC_MSGSEND = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu99; 189 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 190 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 191 | GCC_WARN_UNDECLARED_SELECTOR = YES; 192 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 193 | GCC_WARN_UNUSED_FUNCTION = YES; 194 | GCC_WARN_UNUSED_VARIABLE = YES; 195 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 196 | MTL_ENABLE_DEBUG_INFO = NO; 197 | SDKROOT = iphoneos; 198 | VALIDATE_PRODUCT = YES; 199 | }; 200 | name = Release; 201 | }; 202 | 58B511F01A9E6C8500147676 /* Debug */ = { 203 | isa = XCBuildConfiguration; 204 | buildSettings = { 205 | HEADER_SEARCH_PATHS = ( 206 | "$(inherited)", 207 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 208 | "$(SRCROOT)/../../React/**", 209 | "$(SRCROOT)/../react-native/React/**/**", 210 | "$(SRCROOT)/node_modules/react-native/React/**/**", 211 | ); 212 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 213 | OTHER_LDFLAGS = "-ObjC"; 214 | PRODUCT_NAME = RNPieChart; 215 | SKIP_INSTALL = YES; 216 | USER_HEADER_SEARCH_PATHS = ""; 217 | }; 218 | name = Debug; 219 | }; 220 | 58B511F11A9E6C8500147676 /* Release */ = { 221 | isa = XCBuildConfiguration; 222 | buildSettings = { 223 | HEADER_SEARCH_PATHS = ( 224 | "$(inherited)", 225 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 226 | "$(SRCROOT)/../../React/**", 227 | "$(SRCROOT)/../react-native/React/**/**", 228 | "$(SRCROOT)/node_modules/react-native/React/**/**", 229 | ); 230 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 231 | OTHER_LDFLAGS = "-ObjC"; 232 | PRODUCT_NAME = RNPieChart; 233 | SKIP_INSTALL = YES; 234 | USER_HEADER_SEARCH_PATHS = ""; 235 | }; 236 | name = Release; 237 | }; 238 | /* End XCBuildConfiguration section */ 239 | 240 | /* Begin XCConfigurationList section */ 241 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNPieChart" */ = { 242 | isa = XCConfigurationList; 243 | buildConfigurations = ( 244 | 58B511ED1A9E6C8500147676 /* Debug */, 245 | 58B511EE1A9E6C8500147676 /* Release */, 246 | ); 247 | defaultConfigurationIsVisible = 0; 248 | defaultConfigurationName = Release; 249 | }; 250 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNPieChart" */ = { 251 | isa = XCConfigurationList; 252 | buildConfigurations = ( 253 | 58B511F01A9E6C8500147676 /* Debug */, 254 | 58B511F11A9E6C8500147676 /* Release */, 255 | ); 256 | defaultConfigurationIsVisible = 0; 257 | defaultConfigurationName = Release; 258 | }; 259 | /* End XCConfigurationList section */ 260 | }; 261 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 262 | } 263 | -------------------------------------------------------------------------------- /RNPieChartManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNPieChartManager.h 3 | // RNPieChart 4 | // 5 | // Created by Johannes Stein on 09/05/15. 6 | // 7 | 8 | #import "RCTViewManager.h" 9 | 10 | @interface RNPieChartManager : RCTViewManager 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /RNPieChartManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // RNPieChartManager.m 3 | // RNPieChart 4 | // 5 | // Created by Johannes Stein on 09/05/15. 6 | // 7 | 8 | #import "RNPieChartManager.h" 9 | #import "RNPieChart.h" 10 | #import "RCTBridge.h" 11 | 12 | @implementation RNPieChartManager 13 | 14 | RCT_EXPORT_MODULE(); 15 | 16 | @synthesize bridge = _bridge; 17 | 18 | - (UIView *)view 19 | { 20 | return [[RNPieChart alloc] init]; 21 | } 22 | 23 | RCT_EXPORT_VIEW_PROPERTY(data, NSArray) 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-piechart", 3 | "version": "0.1.0-alpha2", 4 | "description": "A component for React Native", 5 | "main": "RNPieChart.ios.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/frostney/react-native-piechart.git" 12 | }, 13 | "author": "Johannes Stein", 14 | "license": "Public domain", 15 | "bugs": { 16 | "url": "https://github.com/frostney/react-native-piechart/issues" 17 | }, 18 | "dependencies": { 19 | "react-native": "^0.4.0" 20 | }, 21 | "keywords": ["react-native", "react-component", "chart", "piechart"], 22 | "homepage": "https://github.com/frostney/react-native-piechart" 23 | } 24 | --------------------------------------------------------------------------------