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

248
Views
Cómo llenar el área bajo la curva `recharts` `AreaChart`, cuando los datos tienen valores +ve y -ve

Tengo un gráfico hecho con la biblioteca de recargas de javascript. ¿Cómo puedo llenar el área bajo la curva, hasta el fondo del área visible, no hasta cero?

Actualmente se ve así: ingrese la descripción de la imagen aquí

Pero me gustaría que la curva se llenara hasta el final del gráfico, y no hasta cero.

El código para esta sección es el siguiente:

 return ( <ResponsiveContainer width="100%" height="100%"> <AreaChart data={data} margin={{ top: 5, right: 30, left: 20, bottom: 5, }} > <defs> <linearGradient id="fillGradient" x1="0" y1="-1" x2="0" y2="1"> <stop offset="5%" stopColor="#3182ce" stopOpacity={1} /> <stop offset="95%" stopColor="#FFFFFF" stopOpacity={1} /> </linearGradient> </defs> <CartesianGrid strokeDasharray="3 0" opacity={0.2} /> <XAxis dataKey="date" tickFormatter={parseTimeLabels} /> <YAxis /> <Tooltip /> <Legend /> <Area type="natural" dataKey="height" stroke="#8884d8" fillOpacity={1} fill="url(#fillGradient)" activeDot={{ scale: 10, onClick: (e, point) => onLineClick(point) }} /> </AreaChart> </ResponsiveContainer> );
about 4 years ago · Santiago Gelvez
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!