We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluator.ts:157 Uncaught TypeError: Cannot read properties of undefined (reading 'invert')
Simple line chart plot
node: v20.5.0 react: "^18.2.0"
import { ChartCanvas, Chart, LineSeries, CandlestickSeries, XAxis, YAxis, discontinuousTimeScaleProvider } from "react-financial-charts";
const CustomChartCanvas = (props) => { const ohlcData = props.data.map(item => ({ date: new Date(item.Date), open: item.Open, high: item.High, low: item.Low, close: item.Close, volume: item.Volume }));
// console.log(ohlcData);
return ( <> {ohlcData && ( <ChartCanvas height={400} width={800} ratio={3} type={'svg'} margin={{ left: 50, right: 50, top: 10, bottom: 30 }} data={ohlcData} seriesName="OHLC" xAccessor={d => d.date} xScaleProvider={discontinuousTimeScaleProvider} xExtents={[ohlcData[0].date, ohlcData[ohlcData.length - 1].date]} > <Chart id={1} yExtents={d => [d.high, d.low]}>
<LineSeries yAccessor={d => d.close} /> </Chart> </ChartCanvas> )} </>
) }
export default CustomChartCanvas;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm submitting a...
What is the current behavior
evaluator.ts:157 Uncaught TypeError: Cannot read properties of undefined (reading 'invert')
What is the expected behavior
Simple line chart plot
Please tell us about your environment
node: v20.5.0
react: "^18.2.0"
Other information
import { ChartCanvas, Chart, LineSeries, CandlestickSeries, XAxis, YAxis, discontinuousTimeScaleProvider } from "react-financial-charts";
const CustomChartCanvas = (props) => {
const ohlcData = props.data.map(item => ({
date: new Date(item.Date),
open: item.Open,
high: item.High,
low: item.Low,
close: item.Close,
volume: item.Volume
}));
// console.log(ohlcData);
return (
<>
{ohlcData && (
<ChartCanvas height={400} width={800}
ratio={3}
type={'svg'}
margin={{ left: 50, right: 50, top: 10, bottom: 30 }}
data={ohlcData}
seriesName="OHLC"
xAccessor={d => d.date}
xScaleProvider={discontinuousTimeScaleProvider}
xExtents={[ohlcData[0].date, ohlcData[ohlcData.length - 1].date]} >
<Chart id={1} yExtents={d => [d.high, d.low]}>
)
}
export default CustomChartCanvas;
The text was updated successfully, but these errors were encountered: