GithubHelp home page GithubHelp logo

idavydoff / react-decorative-charts Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 12 KB

Library for making decorative svg charts. Designed in order to emphasize the design of the app.

TypeScript 100.00%

react-decorative-charts's Introduction

React Decorative Charts

Library for making decorative svg charts. Designed in order to emphasize the design of the app.

npm version

DEMO PAGE

All colors must be specified in rgb format

Line chart

import { DLineChart } from "react-decorative-charts"

Props

data: {
	color?: number[]; // Default = [134, 153, 175]
	points: number[];
	withSmoothing?: boolean // Default = true
	strokeWidth?: number // Default = 3
	withDots?: boolean // Default = false
	withShadow?: boolean // Default = true
}[];
margin?: string; // Default = undefined
width?: number; // Default = 100
height?: number; // Default = 100

Example

<DLineChart
	data={[
		{
			points: [1, 8, 7, 19],
			color: [133, 223, 183]
		}
	]}
/>

Bar chart

import { DBarChart } from "react-decorative-charts"

Props

color?: number[]; // Default = [134, 153, 175]
data: number[];
margin?: string; // Default = undefined
width?: number; // Default = 100
height?: number; // Default = 100
rounded?: boolean; // Default = true
withGradient?: boolean; // Default = false
gap?: number // Default = 5

Example

<DBarChart
	data={[5, 11, 3, 8, 9]}
	width={200}
/>

Pie chart

import { DPieChart } from "react-decorative-charts"

Props

secondaryColor?: number[]; // Default = [190, 199, 209]
primaryColor?: number[]; // Default = [134, 153, 175]
data: number; // Number of percents
margin?: string; // Default = undefined
radius?: number; // Default = 25

Example

<DPieChart
	data={45}
	radius={50}
/>

react-decorative-charts's People

Contributors

idavydoff avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.