lovely-chart

1.0.1 • Public • Published

LovelyChart

🏆 A Telegram Chart Contest 2019 award winning library.

mobile friendly, high performance, extra lightweight, zero dependency, production ready, open source

lightweight chart js library

Demo

https://ajaxy.github.io/lovely-chart/

Usage

import * as LovelyChart from 'lovely-chart';
import '~/lovely-chart/dist/LovelyChart.css';

LovelyChart.create(container, data);

Arguments for LovelyChart.create

  • container — DOM Node in which the chart is rendered. The chart layout resizes automatically to occupy the entire available width.
  • data — Parameters for a chart.
Parameter Description
title Chart headline
type Chart type. Supported types: line, area, bar, pie
labels Array of UNIX timestamps in milliseconds
datasets Array of params for each dataset
datasets[*].name Dataset name
datasets[*].color Dataset color
datasets[*].values Array of dataset values
isPercentage true for percentage based values
isStacked true for values stacking on top of each other
hasSecondYAxis true for charts with 2 Y axes
onZoom Optional function which returns Promise with data for the zoomed chart (new data object)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.15latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.15
1.0.00
1.0.0-70
1.0.0-60
1.0.0-50
1.0.0-40
1.0.0-30
1.0.0-20
1.0.0-10
1.0.0-00

Package Sidebar

Install

npm i lovely-chart

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

3.45 kB

Total Files

3

Last publish

Collaborators

  • ajaxy