ljhwh586 / klineweb

A kline library for browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KLineChart

Build Status Codacy Badge License
A kline library for browser. As with Android KLineChart.

Browser Support

The library is built on canvas, and as long as the browser supports canvas, it is theoretically supported.The same is true of mobile browsers.

Installing

Using npm:

$ npm install klinecharts

Using yarn:

$ yarn add klinecharts

API

init
var chart = klinecharts.init(document.getElementById('div'))
config(details)
chart.setCofig(config)
data
chart.setDataList(dataList)
chart.addData(data, index)

DataList is an array in which objects within an array need to contain open, close, high, low, timestamp, volume and turnover.

setting indicator
chart.setMainIndicatorType(indicatorType)
chart.setSubIndicatorType(indicatorType)

Indicator Support

MA VOL MACD BOLL KDJ KD RSI BIAS BRAR CCI
DMI CR PSY DMA TRIX OBV VR WR MTM SAR

Sample

https://liihuu.github.io/#/kline

License

Copyright (c) 2019 lihu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A kline library for browser

License:MIT License


Languages

Language:JavaScript 100.0%