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

195
Views
Recharts: dibuje una línea de tendencia en la parte superior de un gráfico de barras

Hola, estoy creando un gráfico de barras usando la biblioteca Recharts. Quiero dibujar una línea de tendencia en la parte superior del gráfico de barras de esta manera: ingrese la descripción de la imagen aquí

Estoy usando lo siguiente para dibujar el gráfico de barras:

 <BarChart data={transformedDataByCategory}> <CartesianGrid strokeDasharray="3 3" vertical={false} /> <XAxis dataKey="category" interval={0} tickLine={false} tick={(e) => { const { payload: { value } } = e; e.fill = theme.colors.onfCategory[value].base; e.fontSize = '11px'; e.fontWeight = 'bold'; return <ChartText {...e}>{value}</ChartText>; }} /> <YAxis /> <Legend /> <Tooltip cursor={{ fill: '#f1f1f1' }} /> {years.map((year, i) => <> <Bar key={`year_${i}`} dataKey={year} fill={yearColours[i]}/> </>)} </BarChart>

He intentado usar el componente ReferenceLine para dibujar encima del gráfico, pero no he tenido suerte. ¡Cualquier ayuda sería genial, gracias!

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!