react-pie-slice

1.3.2 • Public • Published

React Pie Slice

A simple component of a slice created in ReactJS and SVG.

Usage

<PieSlice
  centerX={64}
  centerY={64}
  radius={32}
  start={0}
  end={30}
  opacity={1.0}
  color='blue'
/>

Properties

centerX: React.PropTypes.number // The distance from upper left corner of your screen in x-direction.
centerY: React.PropTypes.number // The distance from upper left corner of your screen in y-direction.
radius: React.PropTypes.number // The distance from the center to the edge of your slice.
start: React.PropTypes.number // The starting angle of a slice in degrees.
end: React.PropTypes.number // The ending angle of a slice in degrees.
color: React.PropTypes.string // The color of the slice. Default: white
opacity: React.PropTypes.number // The opacity of the slice. Default: 1.0
strokeWidth: React.PropTypes.string // The width of the stroke. Default: 1.0
strokeColor: React.PropTypes.string // The color of the stroke. Default: black
strokeOpacity: React.PropTypes.string // The opacity of the stroke. Default: 1.0
mouseEnter: React.PropTypes.func // A callback function to execute when the mouseenter is fired on a slice.
mouseLeave: React.PropTypes.func // A callback function to execute when the mouseleave is fired on a slice.

Package Sidebar

Install

npm i react-pie-slice

Weekly Downloads

1

Version

1.3.2

License

MIT

Unpacked Size

8.82 kB

Total Files

7

Last publish

Collaborators

  • rejas