CryptoCompare API may be blocked by CORS policy so try out the solution. (https://stackoverflow.com/a/42024918/6382158)
- To change supported intervals in chart, modify the array https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/api/index.js#L5
- To change timeframe in chart, modify the object https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/index.jsx#L19
- To change widget default options like theme, interval, symbol etc. modify the defaultProps object https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/index.jsx#L33
- To disable some features, modify the array https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/index.jsx#L57
- To enable some features, modify the array https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/index.jsx#L58
- To add new pairings, add symbol like "BTC/UTH" as key, exhange that supports the key(symbol) as value https://github.com/yasincidem/chart/blob/cad09dcbd2d1039839e63edb92f33cb1917ed2f5/src/components/TVChartContainer/api/pairs.js#L1
- and add symbol, full_name, description, exchange, type to data array for searchable and selectable pairings
- Let's say you want to add "LTC/BTC" pairing.You should know which exchange supports the pairing.In this case "LTC/BTC" is supported by Binance.Then,
export default {
"BTC/USD": "Coinbase",
"ETH/USD": "Coinbase",
"XLM/BTC": "Bitfinex",
"XLM/ETH": "Bitfinex",
"XLM/USD": "Bitfinex",
"LTC/BTC": "Binance"
}
{
symbol: 'LTC/BTC',
full_name: 'LTC/BTC',
description: 'description',
exchange: 'Binance',
type: 'type'
}
git clone https://github.com/yasincidem/chart.git
cd chart
npm install
Make your changes on code
To test your changes do npm start.It will be displayed on localhost:3000
To get production build do npm run build.It will create build folder.
Get charting_library folder, static folder and index.html from build folder add these to public folder in your react app