
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
react-native-pie-chart-custom
Advanced tools
A customizable pie chart component for React Native, built using react-native-svg
.
Install the library:
npm install react-native-pie-chart-custom
Below is a simple example on how to integrate the PieChart into your React Native application. Ensure you have react-native-svg installed in your project to use react-native-pie-chart-custom.
First, you need to import the PieChart from the library:
import PieChart from 'react-native-pie-chart-custom';
Prepare some data that you would like to display in the pie chart:
const dataOutstandingBill = [
{value: 20, color: '#7bc043', label: '20K'},
{value: 30, color: '#f18700', label: '30K'},
{value: 50, color: '#0077b3', label: '50K'},
];
You can render the PieChart inside a view component in your screen. Customize it by setting its size prop to scale the pie chart:
import React from 'react';
import { View, StyleSheet } from 'react-native';
const App = () => {
return (
<View style={styles.container}>
<PieChart data={dataOutstandingBill} size={150} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff'
}
});
export default App;
The PieChart component is highly customizable. You can adjust the size, pass different data arrays, and modify the styles to fit your design needs.
FAQs
A customizable pie chart component for React Native
The npm package react-native-pie-chart-custom receives a total of 0 weekly downloads. As such, react-native-pie-chart-custom popularity was classified as not popular.
We found that react-native-pie-chart-custom 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.