Getting Started
Graphika is a fast JavaScript library to draw elegant graphs in the browser.
Installation
bash
npm install @feds01/graphikabash
yarn add @feds01/graphikabash
pnpm add @feds01/graphikaOr include via script tag:
html
<script src="path/to/graphika.min.js"></script>Quick Start
1. Create a Container
html
<div id="graph">
<canvas width="800" height="600"></canvas>
</div>2. Initialize and Draw
ts
import Graph from "@feds01/graphika";
const graph = new Graph.Graph(
"graph",
{
title: { content: "My First Graph" },
x_label: "X-Axis",
y_label: "Y-Axis",
},
[
{
label: "Series A",
data: [1, 5, 3, 8, 4, 9, 2, 7, 6, 10],
colour: Graph.Colours.PURPLE,
interpolation: "cubic",
},
],
);
graph.draw();Result
Render Time0 ms
Canvas Size600 × 350
Data Points0
Series Count0