{"id":13421931,"url":"https://github.com/fraserxu/react-chartist","last_synced_at":"2025-05-15T02:03:56.569Z","repository":{"id":22569218,"uuid":"25910615","full_name":"fraserxu/react-chartist","owner":"fraserxu","description":"⚛ React component for Chartist.js","archived":false,"fork":false,"pushed_at":"2023-11-03T15:48:08.000Z","size":2224,"stargazers_count":528,"open_issues_count":41,"forks_count":96,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-30T04:54:19.773Z","etag":null,"topics":[],"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/fraserxu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-29T08:05:52.000Z","updated_at":"2024-02-04T00:07:08.000Z","dependencies_parsed_at":"2024-06-18T12:20:26.954Z","dependency_job_id":"591c58fb-1969-443c-9c09-bd637b2000e4","html_url":"https://github.com/fraserxu/react-chartist","commit_stats":{"total_commits":94,"total_committers":31,"mean_commits":3.032258064516129,"dds":0.5425531914893618,"last_synced_commit":"4434ab7dc4838db16d39f92571887a3f173cae65"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraserxu%2Freact-chartist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraserxu%2Freact-chartist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraserxu%2Freact-chartist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraserxu%2Freact-chartist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fraserxu","download_url":"https://codeload.github.com/fraserxu/react-chartist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790472,"owners_count":21162014,"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":[],"created_at":"2024-07-30T23:00:34.114Z","updated_at":"2025-04-13T22:29:31.867Z","avatar_url":"https://github.com/fraserxu.png","language":"JavaScript","funding_links":[],"categories":["UI Components","Uncategorized","Demos","\u003csummary\u003eUI Components\u003c/summary\u003e","JavaScript"],"sub_categories":["Chart","Uncategorized","Data Visualization"],"readme":"react-chartist\n==============\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][downloads-url]\n\n\nReact component for [Chartist.js](https://gionkunz.github.io/chartist-js/)\n\n### Installation\n\n```\n$ npm install react-chartist --save\n```\nChartist is a peer dependency to react chartist. You need to install it if you do not have it installed already.\n\n```\n$ npm install chartist --save\n```\n\n### Usage\n\n```JavaScript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport ChartistGraph from 'react-chartist';\n\nclass Bar extends React.Component {\n  render() {\n\n    var data = {\n      labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],\n      series: [\n        [1, 2, 4, 8, 6, -2, -1, -4, -6, -2]\n      ]\n    };\n\n    var options = {\n      high: 10,\n      low: -10,\n      axisX: {\n        labelInterpolationFnc: function(value, index) {\n          return index % 2 === 0 ? value : null;\n        }\n      }\n    };\n\n    var type = 'Bar'\n\n    return (\n      \u003cdiv\u003e\n        \u003cChartistGraph data={data} options={options} type={type} /\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n\nReactDOM.render(\u003cBar /\u003e, document.body)\n\n```\n\n### Options\n\nPlease check out [Chartist.js API documentation](http://gionkunz.github.io/chartist-js/api-documentation.html) for more details of the options.\n\n* data - chart data (required)\n* type - chart type (required)\n* style - inline css styles (optional)\n* options - chart options (optional)\n* responsive-options - chart responsive options (optional)\n\nTo add support for aspect ratio\n\n```jsx\n\u003cChartistGraph className={'ct-octave'} data={data} options={options} type={type} /\u003e\n```\n\n### Note\n\nThis module does not include the css files for Chartist. If you want to add it, include their CDN in your html file\n\n```HTML\n\u003clink rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css\"\u003e\n\u003cscript src=\"//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js\"\u003e\u003c/script\u003e\n```\n\nOr use `bower` or `npm` to install Chartist and include it in your build process.\n\n```\n$ npm install chartist\n```\n\nOr\n\n```\n$ bower install chartist\n```\n\n### Development\n\n```\n$ npm install\n```\n\nTo build run `npm run build`\n\n### Changelog\n\nIf you want to support react version under v0.13, use `npm install react-chartist@0.9.0`\n\n### License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/react-chartist.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/react-chartist\n[downloads-image]: http://img.shields.io/npm/dm/react-chartist.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/react-chartist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraserxu%2Freact-chartist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraserxu%2Freact-chartist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraserxu%2Freact-chartist/lists"}