{"id":13725991,"url":"https://github.com/oksktank/react-native-pure-chart","last_synced_at":"2025-12-29T23:56:22.387Z","repository":{"id":38375196,"uuid":"104201183","full_name":"oksktank/react-native-pure-chart","owner":"oksktank","description":"react-native chart library that not using svg or ART but only using react native pure components.","archived":false,"fork":false,"pushed_at":"2022-05-11T07:35:11.000Z","size":14576,"stargazers_count":288,"open_issues_count":77,"forks_count":132,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-08T00:10:42.080Z","etag":null,"topics":["barchart","linechart","react-native","react-native-charts","without-drawing-library-integration"],"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/oksktank.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":"2017-09-20T10:29:46.000Z","updated_at":"2024-10-15T21:13:54.000Z","dependencies_parsed_at":"2022-09-16T07:41:06.989Z","dependency_job_id":null,"html_url":"https://github.com/oksktank/react-native-pure-chart","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oksktank%2Freact-native-pure-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oksktank%2Freact-native-pure-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oksktank%2Freact-native-pure-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oksktank%2Freact-native-pure-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oksktank","download_url":"https://codeload.github.com/oksktank/react-native-pure-chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224654061,"owners_count":17347662,"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":["barchart","linechart","react-native","react-native-charts","without-drawing-library-integration"],"created_at":"2024-08-03T01:02:46.088Z","updated_at":"2025-12-29T23:56:22.335Z","avatar_url":"https://github.com/oksktank.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# React Native Pure Chart\n[![NPM Version](https://img.shields.io/npm/v/react-native-pure-chart.svg?style=flat)](https://www.npmjs.org/package/react-native-pure-chart)\n[![npm](https://img.shields.io/npm/dm/react-native-pure-chart.svg?style=flat)](https://www.npmjs.org/package/react-native-pure-chart)\n[![License](http://img.shields.io/npm/l/react-native-pure-chart.svg?style=flat)](https://raw.githubusercontent.com/somonus/react-native-pure-chart/master/LICENSE.md)\n\nPure react native chart library that not using svg or ART but only using `react-native` components.\u003cbr/\u003e(You don't have to import drawing library with `react-native link` or add `ART` to your project!)\n\u003cbr/\u003e\n## Demo\n\n- **LineChart**\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/line.jpeg)\n\n- **LineChart (Multi series)**\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/multiseries_line.jpeg)\n\n- **BarChart**\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/bar.jpeg)\n\n- **BarChart (Multi series)**\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/multiseries_bar.jpeg)\n\n- **PieChart (Beta)**\u003cbr/\u003e\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/pie.jpg)\n\n## Installation\n\n\n\n```bash\nyarn add react-native-pure-chart\n```\n\nAlternatively with npm:\n```bash\nnpm install react-native-pure-chart --save\n```\n## Required\n```js\nimport PureChart from 'react-native-pure-chart';\n```\n\n## Usage\n\n#### Single Series: Simple\n```js\nrender(\n  ...\n  let sampleData = [30, 200, 170, 250, 10]\n  \u003cPureChart data={sampleData} type='line' /\u003e\n  ...\n);\n```\n\n\n#### Single Series: with labels\n\n```js\nrender(\n  ...\n  let sampleData = [\n      {x: '2018-01-01', y: 30},\n      {x: '2018-01-02', y: 200},\n      {x: '2018-01-03', y: 170},\n      {x: '2018-01-04', y: 250},\n      {x: '2018-01-05', y: 10}\n  ]\n  \u003cPureChart data={sampleData} type='line' /\u003e\n  ...\n);\n```\n#### Multi Series: Simple\n```js\nrender(\n  ...\n  let sampleData = [\n      [\n        {seriesName: 'series1', data: [30, 200, 170, 250, 10], color: '#297AB1'},\n        {seriesName: 'series2', data: [20, 100, 150, 130, 15], color: 'yellow'}\n      ]\n  ]\n  \u003cPureChart data={sampleData} type='line' /\u003e\n  ...\n);\n```\n#### Multi Series: with labels\n```js\nrender(\n  ...\n  let sampleData = [\n    {\n      seriesName: 'series1',\n      data: [\n        {x: '2018-02-01', y: 30},\n        {x: '2018-02-02', y: 200},\n        {x: '2018-02-03', y: 170},\n        {x: '2018-02-04', y: 250},\n        {x: '2018-02-05', y: 10}\n      ],\n      color: '#297AB1'\n    },\n    {\n      seriesName: 'series2',\n      data: [\n        {x: '2018-02-01', y: 20},\n        {x: '2018-02-02', y: 100},\n        {x: '2018-02-03', y: 140},\n        {x: '2018-02-04', y: 550},\n        {x: '2018-02-05', y: 40}\n      ],\n      color: 'yellow'\n    }\n  ]\n  \u003cPureChart data={sampleData} type='line' /\u003e\n  ...\n);\n```\n#### Pie chart\n```js\nrender(\n  ...\n  let sampleData = [\n    {\n      value: 50,\n      label: 'Marketing',\n      color: 'red',\n    }, {\n      value: 40,\n      label: 'Sales',\n      color: 'blue'\n    }, {\n      value: 25,\n      label: 'Support',\n      color: 'green'\n    }\n\n  ]\n  \u003cPureChart data={sampleData} type='pie' /\u003e\n  ...\n);\n```\n\n### Props\n\n##### `type`: string\ntype of chart. ['line' | 'bar' | 'pie'] is now available\n\n##### `height`: number\nheight of chart\n\n##### `data`: array\ndata for chart \n```js \n  var data = [30, 200, 170, 250, 10] \n  var dataWithLabel = [\n    {x: '2017-10-01', y: 30}, \n    {x: '2017-10-02', y: 200}, \n    {x: '2017-10-03', y: 170} ... \n  ]\n```\n\nmulti series data for chart \n```js \n  var data = [\n    {seriesName: 'series1', data: [30, 200, 170, 250, 10], color: '#297AB1'},\n    {seriesName: 'series2', data: [40, 250, 110, 290, 14], color: 'blue'}\n  ]\n  var dataWithLabel = [\n    {\n      seriesName: 'series1',\n      data:[\n        {x: '2017-10-01', y: 30}, \n        {x: '2017-10-02', y: 200}, \n        {x: '2017-10-03', y: 170} ...\n      ],\n      color: '#297AB1'\n    },\n    .... \n  ]\n```\n\n##### `customValueRenderer`: func\nadd custom value on the point\n```js\n  \u003cPureChart type={'line'}\n    data={data}\n    width={'100%'}\n    height={200}\n    customValueRenderer={(index, point) =\u003e {\n      if (index % 2 === 0) return null\n      return (\n        \u003cText style={{textAlign: 'center'}}\u003e{point.y}\u003c/Text\u003e\n      )\n    }}/\u003e\n```\n![alt tag](https://raw.githubusercontent.com/oksktank/react-native-pure-chart/master/examples/customValueRenderer.png)\n\n##### `numberOfYAxisGuideLine`: number\nset number of Y Axis guide line\n\n\n\u003c!--\n##### `defaultBorderColor`: number\nset default border color in bar chart\n\n##### `lineThickness`: number (maximum is 10 though getting over 10)\nset line thickness in line chart\n\n##### `yAxisSymbol`: string\nset symbol next to y-guide-value\ne.g. 500$, 40% \n\n##### `showXAxisLabel/showYAxisLabel`: bool\noption to display X-axis-label/y-axis-label\n\n##### `initialScrollPosition / initialScrollTimeOut`: {x:number, y:number, animated:bool} / number\nset initial scroll position in line\u0026bar chart.  \n--\u003e\n\n## Contributing\n\nContributions are welcome. Any kind of contribution, such as writing a documentation, bug fix, or solving issues are helpful.\n\nThe `master` branch of this repository contains the latest stable release of *react-native-pure-chart*. In general, pull requests should be submitted from a separate branch starting from the `develop` branch. \n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foksktank%2Freact-native-pure-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foksktank%2Freact-native-pure-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foksktank%2Freact-native-pure-chart/lists"}