0.4.21 • Published 4 years ago
lines-svg v0.4.21
Lines SVG chart Library
About the project
LinesSvg is a financial chart library based on snapsvg. You can use it to create HTML5 forex/stock charts. The library support standart time based graphics(linear, sma, ema ...), toolset for end users to draw(hints, notes, signals) and create snapshots in PNG or Canvas format.
Supported charts:
- Linear
- Japan candlestick
- Simple Moving Average(SMA)
- Exponential Moving Average(EMA)
Drawing feature:
- Rectangle
- Circle
- Line
- Text
- Pointer
Installation
Npm
npm install lines-svg
From repo
$ git clone
$ cd project_folder
$ npm install
$ npm run build
Demo and initialize snippet
const chartData = [
[1.1, 1.1, 1.3, 1.2, 1588368812844]
...
]; // ohlc Data with timestamp
const l = new Lines(elementID);
l.data(chartData);
l.draw();
Running Tests
Install development dependencies:
$ npm install
Then:
$ npm run test
DESCRIPTION
Interface and functions signature are :
- Constructor Lines("elementID"), expect argument to be existing DOM svg element with elementID.
- Instance.data(dataSet) method expect dataSet to be Array with particular structure 'open', 'high', 'low', 'close', 'timestamp'.
- Instance.draw(type) method, expect/support: all, line, candle, sma, ema type of charts. Default value is all.
- Library support also end user draw of lines, arrows, tunels.
todo
- Transfer library to typescript & use the option to modulize it. Export some of the properties to different file.
npm run build:watch
npm start
IP : 5000 / example/build.html
0.4.21
4 years ago
0.4.20
4 years ago
0.4.19
4 years ago
0.4.18
4 years ago
0.4.16
4 years ago
0.4.11
4 years ago
0.4.9
4 years ago
0.4.5
4 years ago
0.4.7
4 years ago
0.4.1
4 years ago
0.4.3
4 years ago
0.3.9
4 years ago
0.3.7
4 years ago
0.3.5
4 years ago
0.3.3
4 years ago
0.3.1
4 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.0
6 years ago