New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bigo-chart

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigo-chart

可用于股票,基金,加密货币的图表库,支持分时图,蜡烛图

  • 1.1.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

bigo-chart

使用 canvas 绘制,可用于股票,基金,加密货币的轻量级交易图表库,支持分时图,蜡烛图

安装

npm install bigo-chart -S

快速使用

import BigoChart from "bigo-chart"
import "bigo-chart/dist/chart.css"

const option = {
  el: "#chart",
  bars,
  symbol: "ETH",
  hasVolume: true,
  logo: "./logo.png",
  chartType: 1,
}
const chart = new BigoChart(option)

效果展示

  • 支持蜡烛图、分时图、交易量图。
  • 支持视图缩放、拖拽、分页

effect

  • 支持视图实时更新:

effect

配置

配置名称配置说明可选值类型
el图表容器 id,如:'#chart-container'/number
bars历史行情数据{ close: number; high: number; low: number; open: number; volume: number }object
symbol产品标识/string
logo公司 logo 路径/string
chartType图表类型1: 分时图; 2: 蜡烛图number
priceDigitNumber价格精度/number
volumeDigitNumber交易量精度/number
loadMore分页回调,接受一个参数 endTime/(endTime: number) => :bars

API

subscribeBars(close, volume, time)

订阅数据,接受 3 个参数(当前行情, 当前新增的交易量, 当前时间),每次收到新数据都需要执行一次.

chart.setOption(option)

产生新的配置,bigo-chart 会将新配置项和老配置项进行合并取舍,由此产生新的图表样式.

GitHub

https://github.com/HDhuangdi/bigo-chart

LICENSE

MIT

Keywords

FAQs

Package last updated on 10 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc