Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kis/chartify

📊 📈 📉 React.js plugin for building charts using CSS
https://github.com/kis/chartify

barchart chart charts css-chart linechart react react-plugins visualization

Last synced: about 20 hours ago
JSON representation

📊 📈 📉 React.js plugin for building charts using CSS

Awesome Lists containing this project

README

        

Chartify

React.js plugin for building charts using CSS.






Coverage Status

![alt text](https://raw.githubusercontent.com/kis/chartify/master/blocks.jpg)

The source for this module is in the [main repo](https://github.com/kis/chartify).
Example app is [here](https://github.com/kis/chartify/tree/master/example).
Backend service for the example app is [here](https://github.com/kis/chartify-service).
npm package is [here](https://www.npmjs.com/package/chartify).

Install





```
npm install chartify --save-dev
```

Getting started

```javascript
import Chartify from 'chartify';

const data = [{
xValue: '20.11.2016',
yValue: 5,
title: '007 Spectre'
}];

const config = {
theme: 'blue',
width: 50,
height: 10,
boxSize: 20,
isLineChart: false,
bordered: false
};

```

Passing props

Data prop is a dataset that should be an array of objects:
```[{ xValue: '12.03.2019', yValue: 8, title: 'men in black' }]```

Keys are required and types are:
```{ xValue: string, yValue: number, title: string }```

Container prop is a class that will be added to the chart container element. This is important in case you have more than one chart on your page.

Config prop is an object with properties:
theme:string - is color scheme of the chart, "default", "blue", "grey", "white" etc.

width:number - is the length of the data array by X-axis.

height:number - is the length of the data by Y-axis.

boxSize:number - is size of each box in pixels.

isLineChart:boolean - is param that determines if this is a line-chart.

bordered:boolean - is param that determines if each box has white borders.

License

The MIT License (MIT) Copyright (c) 2020