Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/obetomuniz/chrts

Minimalist charts as Web Components using SVG, CSS, and TypeScript
https://github.com/obetomuniz/chrts

charts svg typescript webcomponents

Last synced: about 1 month ago
JSON representation

Minimalist charts as Web Components using SVG, CSS, and TypeScript

Awesome Lists containing this project

README

        

# chrts

Minimalist charts as Web Components using SVG, CSS, and TypeScript.

Screenshot 2023-04-03 at 01 08 53

## Installation

```bash
npm install chrts
```

## Usage

First, import the library in your JavaScript or TypeScript file:

```typescript
import { ChrtsPie, ChrtsBars, ChrtsSegment } from "chrts"
```

Then, use the components in your HTML:

### Pie Chart

```html


```

### Bar Chart

```html


```

Each chart component uses the `` child component to define its data segments. The `` component has three attributes:

- `color`: The color of the segment.
- `label`: The label of the segment.
- `value`: The numerical value of the segment.