1.0.17 • Published 8 months ago

rn-circular-chart v1.0.17

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

React Native Circular Chart Documentation

Import components

  1. yarn add rn-circular-chart
  2. yarn add react-native-svg install peer dependencies
  3. use with ES6 syntax to import components import { DonutChart } from "rn-circular-chart";

Quick Example

import { DonutChart } from "rn-circular-chart";

<View style={styles.sectionWrapper}>
  <DonutChart
    data={[
                    {name: "my Name", value: 1000, color:'#AA86F7'},
                    {name: "Name", value: 3000, color:'#94D5FA'},
                    {name: "ac Name", value: 4000, color:'#8F9FF5'}
                ]}
    strokeWidth={15}
    radius={90}
    containerWidth={width - PADDING * 2} // width comes from Dimensions
    containerHeight={105 * 2}
    type="round"
    startAngle={0}
    endAngle={360}
    animationType="slide"
    centerLabel={ {"label":'CURRENT VALUE',"labelValue":"₹20,34,343" }}
  />
</View>

const styles = StyleSheet.create({
  sectionWrapper: {
    justifyContent: "center",
    alignItems: "center",
    borderWidth: 1,
    borderRadius: 8,
    borderColor: "lightgray",
    backgroundColor: "#ffffff",
    marginVertical: 8,

    shadowColor: "#000",
    shadowOffset: {
      width: 0,
      height: 1,
    },
    shadowOpacity: 0.2,
    shadowRadius: 1.41,

    elevation: 2,
  },
});

Circule Props

PropertyTypeDescription
dataArray<{name: string; value: number; color: string;}>Defines the data for circular
containerWidthnumberDefines the width of container
containerHeightnumberDefines the height of container
radiusnumberDefines the radius of circular
startAnglenumber (degree)Defines the start point of the circular. default start from -115 deg
endAnglenumber (degree)Defines the start point of the circular. default start from 115 deg
strokeWidthnumberDefines the thickness of circular item
type'butt', 'round'Defines the type of circular item
animationType'fade', 'slide'Defines the animation type for chart item
labelValueStyleStylePropDefines the style for data.value
labelTitleStyleStylePropDefines the style for data.name
labelWrapperStyleStylePropDefines the style for wrapper of data.value and data.name
containerStyleStylePropDefines the style for container of chart

More information

This library is built on top of the following open-source projects:

JSONStreamabort-controlleracceptsacornacorn-jsxacorn-walkadd-streamagent-baseaggregate-errorajvanseransi-alignansi-colorsansi-escapesansi-fragmentsansi-regexansi-stylesanymatchappdirsjsargparsearray-buffer-byte-lengtharray-ifyarray-includesarray-unionarray.prototype.findlastindexarray.prototype.flatarray.prototype.flatmaparray.prototype.maparray.prototype.tosortedarraybuffer.prototype.slicearrifyasapast-typesastral-regexasyncasync-limiterasync-retryasynciterator.prototypeasynckitat-least-nodeavailable-typed-arraysbabel-corebabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-plugin-syntax-trailing-function-commasbabel-plugin-transform-flow-enumsbabel-preset-fbjsbalanced-matchbase64-jsbefore-after-hookblboolbaseboxenbrace-expansionbracesbrowserslistbserbufferbuffer-frombuiltinsbytescacheable-requestcall-bindcaller-callsitecaller-pathcallsitescamelcasecamelcase-keyscaniuse-litechalkchardetci-infoclean-stackcli-boxescli-cursorcli-spinnerscli-truncatecli-widthcliuicloneclone-deepclone-responsecolor-convertcolor-namecolorettecombined-streamcommand-existscommandercommondircompare-funccompressiblecompressionconcat-mapconcat-streamconfigstoreconnectconventional-changelogconventional-changelog-angularconventional-changelog-atomconventional-changelog-codemirrorconventional-changelog-conventionalcommitsconventional-changelog-coreconventional-changelog-emberconventional-changelog-eslintconventional-changelog-expressconventional-changelog-jqueryconventional-changelog-jshintconventional-changelog-preset-loaderconventional-changelog-writerconventional-commits-filterconventional-commits-parserconventional-recommended-bumpconvert-source-mapcore-js-compatcore-util-iscosmiconfigcross-spawncrypto-random-stringcss-selectcss-treecss-whatcsstypedargsdata-uri-to-bufferdateformatdayjsdebugdecamelizedecamelize-keysdecode-uri-componentdecompress-responsededentdeep-extenddeep-isdeepmergedefaultsdefer-to-connectdefine-propertiesdegeneratordeldelayed-streamdenodeifydepddeprecated-react-native-prop-typesdeprecationdestroydir-globdoctrinedom-serializerdomelementtypedomhandlerdomutilsdot-propduplexer3ee-firstejselectron-to-chromiumemoji-regexencodeurlend-of-streamenquirerentitiesenvinfoerror-exerror-stack-parsererrorhandleres-abstractes-array-method-boxes-properlyes-get-iteratores-iterator-helperses-set-tostringtages-shim-unscopableses-to-primitiveescaladeescape-goatescape-htmlescape-string-regexpescodegeneslint-import-resolver-nodeeslint-module-utilseslint-plugin-eseslint-plugin-react-native-globalseslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseesutilsetagevent-target-shimexecaexternal-editorfast-deep-equalfast-difffast-globfast-json-stable-stringifyfast-levenshteinfast-xml-parserfastqfb-watchmanfiguresfile-entry-cachefile-uri-to-pathfilelistfill-rangefilter-objfinalhandlerfind-cache-dirfind-upflat-cacheflattedflow-enums-runtimeflow-parserfor-eachform-datafreshfs-extrafs.realpathfseventsftpfunction-bindfunction.prototype.namefunctional-red-black-treefunctions-have-namesgensyncget-caller-fileget-intrinsicget-own-enumerable-property-symbolsget-pkg-repoget-streamget-symbol-descriptionget-urigh-gotgit-raw-commitsgit-remote-origin-urlgit-semver-tagsgit-upgit-url-parsegitconfiglocalgithub-usernameglobglob-parentglobal-dirsglobalsglobalthisglobbygopdgotgraceful-fshandlebarshard-rejectionhashas-bigintshas-flaghas-property-descriptorshas-protohas-symbolshas-tostringtaghas-yarnhermes-estreehermes-parserhermes-profile-transformerhosted-git-infohttp-cache-semanticshttp-errorshttp-proxy-agenthttps-proxy-agenthuman-signalsiconv-liteieee754ignoreimage-sizeimport-cwdimport-freshimport-fromimport-lazyimurmurhashindent-stringinflightinheritsiniinquirerinternal-slotinterpretinvariantipis-absoluteis-argumentsis-array-bufferis-arrayishis-async-functionis-bigintis-boolean-objectis-callableis-ciis-core-moduleis-date-objectis-directoryis-dockeris-extglobis-finalizationregistryis-fullwidth-code-pointis-generator-functionis-git-dirtyis-git-repositoryis-globis-installed-globallyis-interactiveis-mapis-negative-zerois-npmis-numberis-number-objectis-objis-path-cwdis-path-insideis-plain-objis-plain-objectis-regexis-regexpis-relativeis-setis-shared-array-bufferis-sshis-streamis-stringis-symbolis-text-pathis-typed-arrayis-typedarrayis-unc-pathis-unicode-supportedis-weakmapis-weakrefis-weaksetis-windowsis-wslis-yarn-globalisarrayisexeisobjectiterate-iteratoriterate-valueiterator.prototypejakejest-environment-nodejest-get-typejest-message-utiljest-mockjest-regex-utiljest-utiljest-validatejest-workerjetifierjoijs-tokensjs-yamljsc-androidjsc-safe-urljscodeshiftjsescjson-bufferjson-parse-better-errorsjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson-stringify-safejson5jsonfilejsonparsejsx-ast-utilskeyvkind-ofkleurlatest-versionlevenlevnlines-and-columnslistr2load-json-filelocate-pathlodashlodash.debouncelodash.ismatchlodash.mergelodash.throttlelodash.truncatelog-symbolslog-updatelogkittyloose-envifylowercase-keyslru-cachemacos-releasemake-dirmakeerrormap-objmdn-datamemoize-onemeowmerge-streammerge2metrometro-babel-transformermetro-cachemetro-cache-keymetro-configmetro-coremetro-file-mapmetro-inspector-proxymetro-minify-tersermetro-minify-uglifymetro-react-native-babel-transformermetro-resolvermetro-runtimemetro-source-mapmetro-symbolicatemetro-transform-pluginsmetro-transform-workermicromatchmimemime-dbmime-typesmimic-fnmimic-responsemin-indentminimatchminimistminimist-optionsmkdirpmodify-valuesmsmute-streamnatural-comparenegotiatorneo-asyncnetmasknew-github-release-urlnocachenode-abort-controllernode-dirnode-fetchnode-int64node-releasesnode-stream-zipnormalize-package-datanormalize-pathnormalize-urlnpm-run-pathnth-checknullthrowsob1object-assignobject-inspectobject-keysobject.assignobject.entriesobject.fromentriesobject.groupbyobject.hasownobject.valueson-finishedon-headersonceonetimeopenoptionatororaos-nameos-tmpdirp-cancelablep-limitp-locatep-mapp-trypac-proxy-agentpac-resolverpackage-jsonparent-moduleparse-jsonparse-pathparse-urlparseurlpath-existspath-is-absolutepath-keypath-parsepath-typepicocolorspicomatchpifypiratespkg-dirplease-upgrade-nodeprelude-lsprepend-httpprettier-linter-helperspretty-formatprocess-nextick-argsprogresspromisepromise.allsettledpromptsprop-typesprotocolsproxy-agentproxy-from-envpumppunycodepupaqqsquery-stringqueuequeue-microtaskquick-lrurange-parserraw-bodyrcreactreact-devtools-corereact-isreact-nativereact-refreshreact-shallow-rendererread-pkgread-pkg-upreadable-streamreadlinerecastrechoirredentreflect.getprototypeofregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexp.prototype.flagsregexppregexpu-coreregistry-auth-tokenregistry-urlregjsparserrequire-directoryrequire-from-stringrequire-main-filenameresolveresolve-fromresponselikerestore-cursorretryreusifyrfdcrimrafrun-asyncrun-parallelrxjssafe-array-concatsafe-buffersafe-regex-testsafer-bufferschedulersemversemver-comparesemver-diffsendserialize-errorserve-staticset-blockingsetprototypeofshallow-cloneshebang-commandshebang-regexshell-quoteshelljsside-channelsignal-exitsisteransislashslice-ansismart-buffersockssocks-proxy-agentsource-mapsource-map-supportspdx-correctspdx-exceptionsspdx-expression-parsespdx-license-idssplitsplit-on-firstsplit2sprintf-jsstack-utilsstackframestacktrace-parserstatusesstop-iteration-iteratorstrict-uri-encodestring-argvstring-widthstring.prototype.matchallstring.prototype.trimstring.prototype.trimendstring.prototype.trimstartstring_decoderstringify-objectstrip-ansistrip-bomstrip-final-newlinestrip-indentstrip-json-commentsstrnumsudo-promptsupports-colorsupports-preserve-symlinks-flagtabletemptersertext-extensionstext-tablethroatthroughthrough2tmptmplto-fast-propertiesto-readable-streamto-regex-rangetoidentifiertr46trim-newlinestsconfig-pathstslibtsutilstype-checktype-detecttype-festtyped-array-buffertyped-array-byte-lengthtyped-array-byte-offsettyped-array-lengthtypedarraytypedarray-to-bufferuglify-esuglify-jsunbox-primitiveunc-path-regexunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunique-stringuniversal-user-agentuniversalifyunpipeupdate-browserslist-dbupdate-notifieruri-jsurl-joinurl-parse-laxuse-sync-external-storeutil-deprecateutils-mergeuuidv8-compile-cachevalidate-npm-package-licensevalidate-npm-package-namevaryvlqvm2walkerwcwidthwebidl-conversionswhatwg-fetchwhatwg-urlwhichwhich-boxed-primitivewhich-builtin-typewhich-collectionwhich-modulewhich-typed-arraywidest-linewildcard-matchwindows-releaseword-wrapwordwrapwrap-ansiwrappywrite-file-atomicwsxdg-basedirxregexpxtendy18nyallistyamlyargsyargs-parseryocto-queue
1.0.17

8 months ago

1.0.16

8 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago