Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

circle-divided-by-chord

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circle-divided-by-chord

```bash npm install --save circle-divided-by-chord ```

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Circle divided by chord

Divide a circle into two circular segments whose area is proportional to the data

npm


This React component allows you to divide a circle into two circular segments whose area is proportional to the data received in input.
Take a look to divide-up-circle-in-circular-segments for more information.

Install

npm install --save circle-divided-by-chord

or

yarn add circle-divided-by-chord

API

Props are all optional:

PropTypeDefault valueDescription
color1string#8DC0B1color of the first section
color2string#F3E0D2color of the second section
radiusnumber200radius of the circle (px)
datum1number20first datum in [0-100]
datum2number80second datum in [0-100]
anglenumber135rotation angle (degree)

Demo page

Here the demo page.

demo

Examples

import React from "react"
import CircleDividedByChord from "circle-divided-by-chord"

const Example = () => {
  return <CircleDividedByChord />
}

example1


import React from "react"
import CircleDividedByChord from "circle-divided-by-chord"

const Example = () => {
  return (
    <CircleDividedByChord
      radius={150}
      datum1={50}
      datum2={50}
      angle={0}
      color1="#FF6663"
      color2="#0B3954"
    />
  )
}

example2


import React from "react"
import CircleDividedByChord from "circle-divided-by-chord"

const Example = () => {
  return (
    <CircleDividedByChord
      radius={150}
      datum1={70}
      datum2={30}
      angle={0}
      color1="#525174"
      color2="#5DD39E"
    />
  )
}

example3

License

MIT © Ilaria Venturini


This project was bootstrapped with urca generator.

FAQs

Package last updated on 27 Sep 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc