GithubHelp home page GithubHelp logo

bbvox / lines-svg Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 1.56 MB

Lines svg charts, candlestick, sma, ema and ...

Home Page: https://bbvox.github.io/lines-svg/example/

License: Mozilla Public License 2.0

JavaScript 78.90% HTML 18.74% CSS 2.32% Shell 0.03%
svg charts candlestick-chart ema sma fx lines forex

lines-svg's Introduction

Lines SVG chart Library

npm version Build Status Coverage Status

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:

  1. Linear
  2. Japan candlestick
  3. Simple Moving Average(SMA)
  4. Exponential Moving Average(EMA)

Drawing feature:

  1. Rectangle
  2. Circle
  3. Line
  4. Text
  5. Pointer

Installation

  1. Npm npm install lines-svg

  2. From repo

$ git clone
$ cd project_folder
$ npm install
$ npm run build

Demo and initialize snippet

linesSVG charts Demo

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 :

  1. Constructor Lines("elementID"), expect argument to be existing DOM svg element with elementID.
  2. Instance.data(dataSet) method expect dataSet to be Array with particular structure ['open', 'high', 'low', 'close', 'timestamp'].
  3. Instance.draw(type) method, expect/support: all, line, candle, sma, ema type of charts. Default value is all.
  4. Library support also end user draw of lines, arrows, tunels.

todo

  1. 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

https://medium.com/@binyamin/creating-a-node-express-webpack-app-with-dev-and-prod-builds-a4962ce51334

lines-svg's People

Contributors

bbendav avatar bbvox avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lines-svg's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.