1.0.18 • Published 3 years ago

linear-chart-js v1.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Linear Chart JS

Installation

yarn add linear-chart-js

or

npm install linear-chart-js

then

import LinearChart from 'linear-chart-js';

Usage

Create canvas element on your HTML

<canvas id="target" width="500px" height="500px"></canvas>

then write script

new LinearChart(
 document.getElementById('target'),
 [1, 2, 3, 4, 5, 6, 7], // x values
 [2345, 3463, 2343, 2352], // y values
 {
    highlightIndex: 6,
    wayPointsCount: 10,
 }
);

options

optiontypedefaultdescription
isGridbooleantrueShow or Hide the background grid pattern
lineColorstring#a0e1e0Line color
highlightIndexstringundefinedSet the index to highlight
textColorstring#626666Text color
yTopValuenumberMaxY+MinYMaximum y value
backgroundColorstring#FCFCFCBackground color
canvasWidthnumber792Canvas width
canvasHeightnumber312Canvas height
gridXSizenumber33The width of one grid unit
gridYSizenumber26The height of one grid unit
gridStrokeColorstring#a0e1e0The color of the background grid pattern stroke
gridXValueJumpnumber2The offset position of x value
graphPointerHighlightColorstring#219A95The color of highlighed pointer
graphXValueTextColorstring#8D9393The color of highlighed x value
graphPointerColorstring#2AC1BCPointer color
wayPointsCountnumber25The speed of chart animation

69af5047c18dc7a8069e933738644274d835ce25

1.0.18

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.8

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago