{"id":43476238,"url":"https://github.com/dpwiese/react-native-canvas-charts","last_synced_at":"2026-02-03T07:41:15.162Z","repository":{"id":39749799,"uuid":"334559024","full_name":"dpwiese/react-native-canvas-charts","owner":"dpwiese","description":"Simple wrapper around React Native WebView for canvas-based plotting libraries.","archived":false,"fork":false,"pushed_at":"2023-10-22T13:36:58.000Z","size":667,"stargazers_count":20,"open_issues_count":5,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T22:38:10.850Z","etag":null,"topics":["canvas","chartjs","plotting","reactnative","typescript"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpwiese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-31T02:50:12.000Z","updated_at":"2024-10-13T21:11:46.000Z","dependencies_parsed_at":"2022-09-20T10:06:41.115Z","dependency_job_id":null,"html_url":"https://github.com/dpwiese/react-native-canvas-charts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpwiese/react-native-canvas-charts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpwiese%2Freact-native-canvas-charts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpwiese%2Freact-native-canvas-charts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpwiese%2Freact-native-canvas-charts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpwiese%2Freact-native-canvas-charts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpwiese","download_url":"https://codeload.github.com/dpwiese/react-native-canvas-charts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpwiese%2Freact-native-canvas-charts/sbom","scorecard":{"id":354673,"data":{"date":"2025-08-11","repo":{"name":"github.com/dpwiese/react-native-canvas-charts","commit":"156ae918b343d4041d7eec1d6d0f850b6521f451"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/dpwiese/react-native-canvas-charts/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/dpwiese/react-native-canvas-charts/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T09:14:16.604Z","repository_id":39749799,"created_at":"2025-08-18T09:14:16.604Z","updated_at":"2025-08-18T09:14:16.604Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29037532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["canvas","chartjs","plotting","reactnative","typescript"],"created_at":"2026-02-03T07:41:15.050Z","updated_at":"2026-02-03T07:41:15.152Z","avatar_url":"https://github.com/dpwiese.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-canvas-charts\n\n![node-ci](https://github.com/dpwiese/react-native-canvas-charts/workflows/node-ci/badge.svg)\n![npm (scoped)](https://img.shields.io/npm/v/@dpwiese/react-native-canvas-charts)\n\n[react-native-canvas-charts](https://github.com/dpwiese/react-native-canvas-charts) provides a simple wrapper around [react-native-webview](https://github.com/react-native-webview/react-native-webview) for making canvas-based charts in React Native.\nRead more in the post [Canvas Charts in React Native](https://danielwiese.com/posts/react-native-canvas-charts/).\nCurrently supports [Chart.js](https://www.chartjs.org) and [uPlot](https://github.com/leeoniya/uPlot).\n\n![react-native-canvas-charts](img/react-native-canvas-charts.png \"react-native-canvas-charts\")\n\n## Install\n\n```sh\n% npm i --save react-native-webview @dpwiese/react-native-canvas-charts\n% cd ios \u0026\u0026 pod install\n```\n\n## Using\n\n### Chart.js\n\nCurrently [react-native-canvas-charts](https://github.com/dpwiese/react-native-canvas-charts) only supports [Chart.js](https://www.chartjs.org) version 3.\nTo use, simply import `Chart`, define the standard Chart.js [Dataset Configuration](https://www.chartjs.org/docs/master/configuration/index#dataset-configuration) and pass it to the `config` prop.\n\n```js\nimport { Chart } from \"@dpwiese/react-native-canvas-charts/ChartJs\";\n\nconst chartConfig = {\n  type: \"line\",\n  data: {\n    datasets: [\n      {\n        label: \"My Legend Label\",\n        backgroundColor: \"rgb(224, 110, 60)\",\n        borderColor: \"rgb(224, 110, 60)\",\n        data: [\n          { x: 1, y: 2 },\n          { x: 2, y: 5 },\n          { x: 3, y: 3 },\n        ],\n        fill: false,\n        pointRadius: 0,\n        lineTension: 0.1,\n        borderJoinStyle: \"round\",\n      },\n    ],\n  },\n  options: {\n    animation: {\n      duration: 0,\n    },\n    responsive: true,\n    plugins: {\n      title: {\n        display: true,\n        text: \"My Title\",\n      },\n      tooltip: {\n        mode: \"index\",\n        intersect: false,\n      },\n    },\n    hover: {\n      mode: \"nearest\",\n      intersect: true,\n    },\n    scales: {\n      x: {\n        type: \"linear\",\n        display: true,\n        scaleLabel: {\n          display: true,\n          labelString: \"My X-Axis Label\",\n        },\n        ticks: {\n          autoSkipPadding: 100,\n          autoSkip: true,\n          minRotation: 0,\n          maxRotation: 0,\n        },\n      },\n      y: {\n        display: true,\n        scaleLabel: {\n          display: true,\n          labelString: \"My Y-Axis Label\",\n        },\n      },\n    },\n  },\n};\n\nexport default () =\u003e \u003cChart config={chartConfig} style={{height: '100%', width: '100%'}}/\u003e;\n```\n\n#### Streaming Data\n\nTo stream data to the chart, the `setData` ref can be used as below\n\n```js\nimport { Chart, SetData } from \"@dpwiese/react-native-canvas-charts/ChartJs\";\nimport { useRef } from \"react\";\nimport { chartConfig } from \"./chartConfig\";\n\nexport default () =\u003e {\n  const setDataRef = useRef\u003cSetData\u003e();\n\n  // Update the charted data with newData\n  setDataRef.current.setData(newData);\n\n  return (\u003cChart config={chartConfig} ref={setDataRef} style={{height: '100%', width: '100%'}}/\u003e);\n}\n```\n\n### uPlot\n\n[uPlot](https://github.com/leeoniya/uPlot) is a very performant canvas-based plotting library supported by [react-native-canvas-charts](https://github.com/dpwiese/react-native-canvas-charts).\nTo use, simply import `UPlot` and pass it [`data`](https://github.com/leeoniya/uPlot/tree/master/docs#data-format) and [`opts`](https://github.com/leeoniya/uPlot/tree/master/docs#basics).\n\n```js\nimport { UPlot } from \"@dpwiese/react-native-canvas-charts/UPlot\";\n\nconst opts = {\n  title: \"My Chart\",\n  id: \"chart1\",\n  class: \"my-chart\",\n  width: 400,\n  height: 600,\n  series: [\n    {},\n    {\n      show: true,\n      spanGaps: false,\n      label: \"RAM\",\n      value: (self, rawValue) =\u003e \"$\" + rawValue.toFixed(2),\n      stroke: \"red\",\n      width: 1,\n      fill: \"rgba(255, 0, 0, 0.3)\",\n      dash: [10, 5],\n    },\n  ],\n};\n\nconst data = [\n  [0, 100],\n  [35, 71],\n  [90, 15],\n];\n\nexport default () =\u003e \u003cUPlot opts={opts} data={data}/\u003e;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpwiese%2Freact-native-canvas-charts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpwiese%2Freact-native-canvas-charts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpwiese%2Freact-native-canvas-charts/lists"}