Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno_chart/graph/GraphInstance.ts>Graph

A graph library for deno. Inspired by Chart.js. A simpler implementation for basic bar graphs that save to an image.
Latest
class Graph
import { Graph } from "https://deno.land/x/deno_chart@1.1.0/graph/GraphInstance.ts";

Constructors

new
Graph(config?: Partial<GraphOptions>)

Constructs Graph Configuration

Properties

private
_entries: BarEntry[]
private
_options: GraphOptions
private
_x_offset: number
private
_x_padding: number
private
_y_offset: number
private
_y_padding: number

Methods

private
_draw_bars()

Internal: Draws graph bar entries

Internal: Draws Graph outline

Internal: Draws graph segments

add(entry: BarEntry): void

Adds given Bar entry to Graph

Draws graph with entries to Canvas Context

save(imagePath: string)

Saves graph as png to given path