Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
react-native-pie-chart
Advanced tools
Simple pie chart module for your React Native app.
Note: Support both ios and android now.
~$ npm install react-native-pie-chart --save
Note: You can find this example in test folder.
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, ScrollView , StatusBar, Text, View } from 'react-native';
import PieChart from 'react-native-pie-chart';
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center'
},
title: {
fontSize: 24,
margin: 10
}
});
export default class test extends Component {
render() {
const chart_wh = 250
const series = [123, 321, 123, 789, 537]
const sliceColor = ['#F44336','#2196F3','#FFEB3B', '#4CAF50', '#FF9800']
return (
<ScrollView style={{flex: 1}}>
<View style={styles.container}>
<StatusBar
hidden={true}
/>
<Text style={styles.title}>Basic</Text>
<PieChart
chart_wh={chart_wh}
series={series}
sliceColor={sliceColor}
/>
<Text style={styles.title}>Doughnut</Text>
<PieChart
chart_wh={chart_wh}
series={series}
sliceColor={sliceColor}
doughnut={true}
coverRadius={0.45}
coverFill={'#FFF'}
/>
</View>
</ScrollView>
);
}
}
AppRegistry.registerComponent('test', () => test);
Property | Type | Description | Required | Default |
---|---|---|---|---|
chart_wh | Number | chart width and height | Yes | |
coverFill | String | doughnut cover fill color | No | #FFF |
coverRadius | Number | doughnut cover radius | No | 0.6 |
doughnut | Bool | doughnut style | No | false |
series | Array < number > | series data array | Yes | |
sliceColor | Array < string > | series slice color array | Yes | |
style | Object | pie chart style | No | {} |
FAQs
pie chart for react native
The npm package react-native-pie-chart receives a total of 4,578 weekly downloads. As such, react-native-pie-chart popularity was classified as popular.
We found that react-native-pie-chart demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.