apicharts
v0.3.4
Published
Simple charting components for external & dynamic data sources... give it a url and go!
Downloads
2
Maintainers
Readme
apicharts (warning: preproduction = API changing constantly, stay tuned)
Displaying charts from an API feed should be easy. Now it is.
Why?
Because sometimes we just need to visualize our data quickly and can't be bothered to wire up the fetching/data-loading process. ApiChart handles it for you.
Example Usage 1 (local API, no data transforms needed)
<ApiChart
type="spline"
url="/api/snapshot/NEOBTC"
dataPath="history"
series={[
{ name: 'high', yPath: 'high' },
{ name: 'low', yPath: 'low' },
{ name: 'open', yPath: 'open' },
{ name: 'close', yPath: 'close' },
]}
zerobased={false}
timeseries
autodetect
/>
Example Usage 2 (remote API, some data transforms needed)
<ApiChart
title="ETH/BTC Spline"
type="area"
url="https://api.binance.com/api/v1/klines?symbol=NEOBTC&interval=1h&limit=240"
formatter={
(v) => ({
date: v[0],
close: v[4],
})
}
series={[
{ name: 'close', yPath: 'close' },
]}
autodetect
timeseries
/>