npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@salmonco/react-native-radar-chart

v0.0.26

Published

You can draw radar charts easily.

Downloads

359

Readme

react-native-radar-chart

You can draw radar charts easily.

Screenshot

Installation

npm install @salmonco/react-native-radar-chart react-native-svg

Usage

import React from 'react';
import {StyleSheet, SafeAreaView} from 'react-native';
import {RadarChart} from '@salmonco/react-native-radar-chart';

const App = () => {
  const data = [
    {label: 'data1', value: 30},
    {label: 'data2', value: 55},
    {label: 'data3', value: 70},
    {label: 'data4', value: 35},
    {label: 'data5', value: 10},
    {label: 'data6', value: 60},
    {label: 'data7', value: 38},
    {label: 'data8', value: 65},
  ];

  return (
    <SafeAreaView style={styles.container}>
      <RadarChart
        data={data}
        maxValue={100}
        gradientColor={{
          startColor: '#FF9432',
          endColor: '#FFF8F1',
          count: 5,
        }}
        stroke={['#FFE8D3', '#FFE8D3', '#FFE8D3', '#FFE8D3', '#ff9532']}
        strokeWidth={[0.5, 0.5, 0.5, 0.5, 1]}
        strokeOpacity={[1, 1, 1, 1, 0.13]}
        labelColor="#433D3A"
        dataFillColor="#FF9432"
        dataFillOpacity={0.8}
        dataStroke="salmon"
        dataStrokeWidth={2}
        isCircle
      />
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

export default App;

Props

| Prop | Description | Type | Default | | --------------------- | -------------------------------------------------------------- | ------------- | ------------------- | | data | Label and value pair data to be displayed on the radar chart | RadarData[] | required | | size | Size of radar chart | number | 330 | | scale | Adjusts the size of the radar chart. Larger values ​​make the chart larger, while smaller values ​​make the chart smaller. | number | 1 | | maxValue | The maximum value of data to display on the radar chart. The end point of the chart is reached when the value of the data corresponds to maxValue. | number | The maximum value among the values ​​of data | | fillColor | Color inside chart | string | salmon | | fillOpacity | Opacity inside chart | number | 1 | | gradientColor | The gradient color inside the chart | GradientColor | fillColor ?? salmon | | stroke | Stroke inside chart | string[] | white | | strokeWidth | Width of stroke inside chart | number[] | 0.5 | | strokeOpacity | Opacity of stroke inside chart | number[] | 1 | | labelSize | Size of labels in data | number | 16 | | labelColor | Color of labels in data | string | black | | labelFontFamily | Font family of labels in data | string | Inter | | labelDistance | Adjusts the position of the label. Larger values ​​move the labels farther away from the edges of the chart, while smaller values ​​move the labels closer to the center of the chart. | number | 1.15 | | dataFillColor | Color of data area | string | green | | dataFillOpacity | Opacity of data area | number | 1 | | dataStroke | Stroke of data area | string | undefined | | dataStrokeWidth | Width of stroke of data area | number | 1 | | dataStrokeOpacity | Opacity of stroke of data area | number | 1 | | divisionStroke | Stroke of division line that divides each data axis | string | white | | divisionStrokeWidth | Width of division line that divides each data axis | number | 1 | | divisionStrokeOpacity | Opacity of stroke of division line that divides each data axis | number | 0.5 | | isCircle | Whether the chart is circular | boolean | false |

Contributing

Contributions are always welcome!

License

MIT