![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-native-polygon-chart
Advanced tools
Customizable and animatable polygon chart.
npm install react-native-svg react-native-polygon-chart
or
yarn add react-native-svg react-native-polygon-chart
In your project's ios directory
pod install
No additional steps needed
import {
Hexagon,
Pentagon,
Tetragon,
Triangle,
} from 'react-native-polygon-chart';
<Triangle
poles= {[
{
score: 0.8,
innerStroke: {opacity: 1, stroke: "#30d158", strokeWidth: 2},
stroke: {opacity: 1, stroke: "#0a84ff"},
},
{
score: 0.6,
innerStroke: {opacity: 1, stroke: "#30d158", strokeWidth: 2},
stroke: {opacity: 1, stroke: "#0a84ff"},
},
{
score: 0.9,
innerStroke: {opacity: 1, stroke: "#30d158", strokeWidth: 2},
stroke: {opacity: 1, stroke: "#0a84ff"},
},
]}
innerColor="#30d158"
innerOpacity={0.2}
outerStroke={{stroke: green, opacity: 1, strokeWidth: 1}}
animation={{delay: 0, duration: 500}}
style={styles.triangle}
/>
...
const styles = StyleSheet.create({
triangle: {width: 300, height: 600},
});
You can use more poles for other polygons or polygon will render as if remaining scores are zero.
animation
Type | Required | Description |
---|---|---|
IAnimationParams | no | Object that specifies the details of the polygon render animation. |
innerColor
Type | Required | Description |
---|---|---|
string | no | Fill color of the polygon. |
innerOpacity
Type | Required | Description |
---|---|---|
number | no | Fill opacity of the polygon. |
outerStroke
Type | Required | Description |
---|---|---|
ILineProps | no | Props for outer stroke of the polygon. |
poles
Type | Required | Description |
---|---|---|
Array<IPole> | yes | An array of details to draw the polygon. |
style
Type | Required | Description |
---|---|---|
ViewStyle | no | Style of the polygon's container. |
ILineProps
Props | Type | Required |
---|---|---|
stroke | string | no |
strokeWidth | number | no |
opacity | number | no |
stroke
prop is being used for line color.IPole
Props | Type | Required |
---|---|---|
score | number | yes |
info | IInfo | no |
stroke | ILineProps | no |
innerStroke | ILineProps | no |
point
prop is a multiplier between 0 and 1 determines the vertex distance from the center of the polygon.IInfo
Props | Type | Required |
---|---|---|
text | string | JSX.Element | no |
textStyle | TextStyle | no |
style | ViewStyle | no |
onPress | () => void | no |
offset | IOffset | no |
offset
prop determines the absolute x and y offsets of info element.IOffset
Props | Type | Required |
---|---|---|
x | number | yes |
y | number | yes |
IAnimationParams
Props | Type | Required |
---|---|---|
delay | number | no |
duration | number | no |
easing | EasingFunction | no |
FAQs
Customizable and animatable polygon chart.
We found that react-native-polygon-chart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.