
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
react-candlestick-chart
Advanced tools
High performance, lightweight and interactive candlestick chart using the canvas tag, D3 and React.
High performance, lightweight and interactive candlestick chart using the canvas tag, D3 and React.
npm i react-candlestick-chart
To discover all features, capabilities and source code, check out Live Demo

import CandlestickChart from "react-candlestick-chart";
function App() {
return (
<CandlestickChart
data={data}
id={"chart1"}
width={1000}
height={400}
decimal={2}
scrollZoom={{
enable: true,
max: 20,
}}
rangeSelector={{
enable: true,
height: 150,
initialRange: { type: "month", value: 1 },
}}
/>
);
}
data: any;
example: [
{
date: "2018-10-23", //or 1540166400000 or "2018-10-22 03:30"
open: 182.47,
high: 183.01,
low: 177.39,
close: 179.93,
//position is optional
position: {
positionType: "long", // or "short"
sl: 170, //stop loss
tp: 190, // take profit
positionValue: 180,
},
},
{
date: "2018-10-24",
open: 180.82,
high: 181.4,
low: 177.56,
close: 178.75,
},
];
id: string;
width: number;
height: number;
decimal for price axis.
decimal?: number; // default value = 0
scrollZoom?: {
enable: boolean;
max: number;
};
/*
default value :
{
enable: false,
max: 1
}
*/
rangeSelector?: {
enable: boolean;
height: number;
initialRange?: {
type: "month" | "day" | "hour" | "percent" | "milliseconds";
value: number;
};
};
/*
default value :
{
enable: false;
height: 0;
initialRange?: {
type: "percent";
value: 100;
};
}
*/
responsiveBreakPoint?: number; // default value = 400 (px)
enableResetButton?: boolean; // default value = true
dataViewerTexts? : {
shortPosition?: string;
longPosition?: string;
stopLoss?: string;
takeProfit?: string;
open?: string;
high?: string;
low?: string;
close?: string;
}
/*
default value:
{
shortPosition: "Short",
longPosition: "Long",
stopLoss: "sl",
takeProfit: "tp",
open: "O",
high: "H",
low: "L",
close: "C",
}
*/
dataViewerColors? : {
shortPositionLabel?: string;
shortPositionData?: string;
longPositionLabel?: string;
longPositionData?: string;
stopLossLabel?: string;
stopLossData?: string;
takeProfitLabel?: string;
takeProfitData?: string;
openLabel?: string;
openDataUp?: string;
openDataDown?: string;
highLabel?: string;
highDataUp?: string;
highDataDown?: string;
lowLabel?: string;
lowDataUp?: string;
lowDataDown?: string;
closeLabel?: string;
closeDataUp?: string;
closeDataDown?: string;
}
/*
default value:
{
shortPositionLabel: "#b2b5be",
shortPositionData:"#fff",
longPositionLabel:"#b2b5be",
longPositionData: "#fff",
stopLossLabel:"#b2b5be",
stopLossData:"#F9DB04",
takeProfitLabel:"#b2b5be",
takeProfitData:"#04F5F9",
openLabel:"#b2b5be",
openDataUp:"#089981",
openDataDown:"#e13443",
highLabel:"#b2b5be",
highDataUp:"#089981",
highDataDown:"#e13443",
lowLabel:"#b2b5be",
lowDataUp:"#089981",
lowDataDown:"#e13443",
closeLabel:"#b2b5be",
closeDataUp:"#089981",
closeDataDown:"#e13443",
}
*/
ColorPalette? : {
background?: string;
grid?: string;
tick?: string;
selectorLine?: string;
selectorLabelBackground?: string;
selectorLabelText?: string;
greenCandle?: string;
redCandle?: string;
longPosition?: string;
shortPosition?: string;
sl?: string;
tp?: string;
RSChartStroke?: string;
RSChartOverlay?: string;
RSChartOverlayResize?: string;
resetButtonColor?: string;
}
/*
default value:
{
background:"#161b26",
grid:"#222631",
tick:"#b2b5be",
selectorLine:"rgba(178,181,190,0.5)",
selectorLabelBackground:"#2a2e39",
selectorLabelText:"#b2b5be",
greenCandle:"#089981",
redCandle:"#e13443",
longPosition:"#fff",
shortPosition:"#fff",
sl:"#F9DB04",
tp:"#04F5F9",
RSChartStroke:"#04F5F9",
RSChartOverlay:"#000",
RSChartOverlayResize:"#e13443",
resetButtonColor:"#04F5F9",
}
*/
FAQs
High performance, lightweight and interactive candlestick chart using the canvas tag, D3 and React.
The npm package react-candlestick-chart receives a total of 40 weekly downloads. As such, react-candlestick-chart popularity was classified as not popular.
We found that react-candlestick-chart demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.