Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
¿Cómo puedo crear un gráfico de desplazamiento horizontal en reaccionar usando rechartjs?

Me gustaría crear un gráfico de área con Rechart.js pero con la posición fija del eje y cuando me desplazo.

Lo que me sucede es que los datos se desmoronan, ¿cómo podría hacer que se pueda desplazar, tampoco pude encontrarlos en los documentos, alguna idea?

Gracias

 const validate = React.useCallback(() => { setArr((prevState) => [...prevState, { X: Math.random() >= 0.5 ? 5 : 0 }] ); }, []); React.useEffect(() => { if (timeoutRef.current !== null) { clearTimeout(timeoutRef.current); } const interval = 6000; const speed = 1000; for (let i = 0; i < interval; i++) { timeoutRef.current = setTimeout(() => { timeoutRef.current = null; validate(); }, i * speed); } }, [validate]); return ( <div> <h1>{time}</h1> <AreaChart width={730} height={250} data={arr} margin={{ top: 5, right: 30, left: 20, bottom: 5 }} > {/* <CartesianGrid strokeDasharray='3 3' /> */} <YAxis /> <XAxis additive='sum' /> <Tooltip /> <Legend /> <Area type='monotone' dataKey='X' stroke='#8884d8' isAnimationActive={false} additive='sum' /> <Brush startIndex={0} endIndex={10}> <AreaChart> <Area dataKey='X' isAnimationActive={false} /> </AreaChart> </Brush> </AreaChart> </div> ); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!