crypto-chart-react

0.2.3 • Public • Published

Cryptocurrency Price Chart as a React Component

npm package

example chart


Table of contents


Installation

yarn add crypto-chart-react

Demo

https://alis.ocrybit.com/coins/?sym=BTC


Examples

import React, { Component } from 'react'
import { render } from 'react-dom'
import CHART from '../../src'
 
class App extends Component {
  constructor(props){
    super(props)
  }
  render(){
    // possible spans: day, week, month, 3month, year, all
    return (
      <CHART
        id="crypto_chart"
        height={300}
        width={700}
        fsym="ALIS"
        tsym="JPY"
        span="day"
        borderColor="#61669F"
        />
    )
  }
}
 
render(<App />, document.getElementById("root"))
 
import React, { Component } from 'react'
import { render } from 'react-dom'
import CHART from '../../src'
 
class App extends Component {
  constructor(props){
    super(props)
  }
  render(){
    // custom span
    return (
      <CHART
        id="crypto_chart"
        height={300}
        width={700}
        fsym="ALIS"
        tsym="JPY"
        timezone="Asia/Tokyo"
        limit={24*6}
        style={{margin: "25px"}}
        wrapper_id="crypto_chart_wrapper"
        toTs={{Math.floor(Date.now() / 1000)}}
        borderColor="#61669F"
        />
    )
  }
}
 
render(<App />, document.getElementById("root"))

Contributors

Readme

Keywords

Package Sidebar

Install

npm i crypto-chart-react

Weekly Downloads

5

Version

0.2.3

License

MIT

Unpacked Size

60.5 kB

Total Files

10

Last publish

Collaborators

  • ocrybit