New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tsdev-react-pie-chart

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsdev-react-pie-chart

ReactJS chart component

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

TSDEV-REACT-PIE-CHART

ReactJS component for data visualization

alt text

Installation

npm install --save-dev tsdev-react-pie-chart

Import & Usage

import { TsdevPieChart } from 'tsdev-react-pie-chart';

...

<TsdevPieChart id="my-chart">

Properties

nametypedefaultrequired
backgroundColorstring'transparent'no
backgroundColorLegendstring'transparent'no
colorRangearray>>> read more >>>no
dataSetarray>>> read more >>>no
decimalsnumber2no
endAnglenumber360no
heightnumber250no
idstring'tsdev-pie-chart-{Date.now()}'yes
innerLabelColorstring'#ffffff'no
innerLabelSizenumber12no
innerLabelTypestring'value'no
labelLineColorstring'#000000'no
labelLineDotColorstring'#000000'no
labelLineDotRadiusnumber2no
labelLineWidthnumber1no
legendColorstring'transparent'no
legendHeightnumber70no
onSegmentClickfunc>>> read more >>>no
outerLabelColorstring'#000000'no
outerLabelOffsetnumber5no
outerLabelSizenumber12no
outerLabelTypestring'label'no
radiusnumber120no
rotationnumber0no
showInnerLabelsboolfalseno
showLabelLineboolfalseno
showLabelLineDotboolfalseno
showLegendboolfalseno
showOuterLabelsboolfalseno
showSortedValuesboolfalseno
showTooltipsboolfalseno
sortDirectionstring'asc'no
startAnglenumber0no
strokeColorstring'#ffffff'no
strokeWidthnumber1no
subClassstring''no
tooltipTypestring'labelValue'no
widthnumber250no
xOffsetnumber0no
yOffsetnumber0no

Layout

  • '/dist/styles.css'

Static Storybook

  • open with browser '/storybook-static/index.html'

Functions

onSegmentClick(obj) => {
	console.log(obj);
}

colorRange

 colorRange: ['#85c7f1', '#549bf1', '#3329eb', '#0800a2', '#000000']

dataSet

 // !!! AVOID negative values !!!

 dataSet: [
        {
            label: 'one',
            value: 10
        },
        {
            label: 'two',
            value: 40
        },
        {
            label: 'three',
            value: 20
        },
        {
            label: 'four',
            value: 20
        },
        {
            label: 'five',
            value: 10
        }
    ]

innerLabelType

value
label
labelValue
percent
labelPercent

outerLabelType

value
label
labelValue
percent
labelPercent

tooltipType

value
label
labelValue
percent
labelPercent

Keywords

data visualization

FAQs

Package last updated on 12 Apr 2019

Did you know?

Socket

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.

Install

Related posts