https://github.com/markpluslabs/markplus-charts
https://github.com/markpluslabs/markplus-charts
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/markpluslabs/markplus-charts
- Owner: markpluslabs
- Created: 2021-12-04T06:53:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-24T19:44:07.000Z (about 1 year ago)
- Last Synced: 2024-11-24T20:24:19.607Z (about 1 year ago)
- Language: TypeScript
- Size: 324 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MarkPlus Charts
MarkPlus Charts is a versatile library for generating charts in SVG format. It works seamlessly in both browser and server-side environments, without relying on the DOM or Canvas, making it lightweight and highly adaptable.
## Philosophy
This library aims to offer features comparable to [Mermaid](https://mermaid.js.org/) and [Chart.js](https://www.chartjs.org/), but without relying on the DOM or Canvas.
## Why?
While I appreciate the capabilities of Mermaid and Chart.js, their heavy dependencies make them less suitable for server-side or Node.js environments. This inspired me to create a lightweight alternative that operates independently of browser-specific technologies.
## Install
```
yarn add add markplus-charts
```
## Usage
```ts
import { generate } from 'markplus-charts';
try {
const svgStr = await generate('A -> B');
} catch(e) {
console.log(e.message);
}
```
## Chart syntax
Refer to [syntax](./syntax.md)