{"id":21090282,"url":"https://github.com/xinlc/react-native-time-pie","last_synced_at":"2026-04-28T09:05:06.666Z","repository":{"id":57340888,"uuid":"129388089","full_name":"xinlc/react-native-time-pie","owner":"xinlc","description":"Pie chart with time","archived":false,"fork":false,"pushed_at":"2018-05-30T03:11:10.000Z","size":360,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T21:04:41.008Z","etag":null,"topics":["pie","react-native-component","time"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xinlc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-13T10:37:50.000Z","updated_at":"2021-05-03T00:08:23.000Z","dependencies_parsed_at":"2022-09-07T16:40:24.339Z","dependency_job_id":null,"html_url":"https://github.com/xinlc/react-native-time-pie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Freact-native-time-pie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Freact-native-time-pie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Freact-native-time-pie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Freact-native-time-pie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinlc","download_url":"https://codeload.github.com/xinlc/react-native-time-pie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532556,"owners_count":20306157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pie","react-native-component","time"],"created_at":"2024-11-19T21:35:11.539Z","updated_at":"2025-12-29T09:07:34.677Z","avatar_url":"https://github.com/xinlc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# react-native-time-pie\n\n[![npm package](https://img.shields.io/npm/v/react-native-time-pie.svg?style=flat-square)](https://www.npmjs.org/package/react-native-time-pie)\n[![npm downloads](https://img.shields.io/npm/dt/react-native-time-pie.svg)](https://www.npmjs.com/package/react-native-time-pie)\n\n## 运行效果\n\n![](./docs/ios.jpeg)\n![](./docs/android.jpeg)\n\n\n## 添加依赖\nAndroid默认就包含ART库，IOS需要单独添加依赖库。\n\n1. 使用xcode中打开react-native中的ios项目，选中`Libraries`目录 ——\u003e 右键选择`Add Files to 项目名称` ——\u003e `node_modules/react-native/Libraries/ART/ART.xcodeproj` 添加；\n\n![](./docs/ios1.jpeg)\n\n2. 选中项目根目录 ——\u003e 点击`Build Phases` ——\u003e 点击`Link Binary With Libraries` ——\u003e 点击左下方`+` ——\u003e 选中`libART.a`添加。\n\n![](./docs/ios2.jpeg)\n\n## 安装和使用\n\n1. 使用`npm`安装:\n\n```bash\n$ npm install --save react-native-time-pie\n```\n\n2. 导入组件:\n\n```js\nimport Pie from 'react-native-time-pie';\n```\n\n3. 使用组件:\n\n```js\n...\n  render() {\n    const foo = { startTime: '08:00', endTime: '11:00', fillColor: 'green' };\n    const bar = { startTime: '20:00', endTime: '23:30', fillColor: 'blue' };\n    const pieData = [foo, bar];\n\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cPie \n          data={pieData}\n        /\u003e\n      \u003c/View\u003e\n    );\n  }\n...\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    padding: 30,\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinlc%2Freact-native-time-pie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinlc%2Freact-native-time-pie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinlc%2Freact-native-time-pie/lists"}