sc0ttj / component

A tiny library for isomorphic JavaScript components
MIT License
2 stars 1 forks source link

added candlesticks: #61

Closed sc0ttj closed 2 years ago

sc0ttj commented 2 years ago

Added "candlestick" drawing method - for better financial/crypto charts. Adds just over 0.1kb.

Usage:

data.candle({
  open: data.open,
  close: data.close,
  high: data.high,
  low: data.low,
  style: {
    lineWidth: 1,
  }
});

..you can optionally pass in "green" and "red" properties before "style", to set those colours.

NOTE: You cannot (yet) have horizontal candlesticks.. never seen them anyway..