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

164
Views
¿Hay alguna manera de trazar el cambio de día en una escala de tiempo por hora en el eje x? ReactJS - Recráficos

Estoy usando Recharts (una biblioteca ReactJS para gráficos).

En el eje x, quiero mostrar la fecha siempre que la hora cruce la medianoche. Algo como esto:

 22:00 22:20 23:00 23:30 2010-11-17 00:15 01:30 02:00

Aquí está el código de ejemplo: https://codepen.io/nahushf/pen/PgrgLX?editors=1010

 const {BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend} = Recharts; const data = [ {name: '22:00', uv: 4000, pv: 2400, amt: 2400}, {name: '22:30', uv: 3000, pv: 1398, amt: 2210}, {name: '23:00', uv: 2000, pv: 9800, amt: 2290}, {name: '23:30', uv: 2780, pv: 3908, amt: 2000}, {name: '00:15', uv: 1890, pv: 4800, amt: 2181}, {name: '00:30', uv: 2390, pv: 3800, amt: 2500}, {name: '01:30', uv: 3490, pv: 4300, amt: 2100}, ]; const SimpleBarChart = React.createClass({ render () { return ( <BarChart width={600} height={300} data={data} margin={{top: 5, right: 30, left: 20, bottom: 5}}> <XAxis dataKey="name" xAxisId={0} /> <XAxis dataKey="name" xAxisId={1} hide/> <YAxis/> <CartesianGrid strokeDasharray="3 3"/> <Tooltip/> <Legend /> <Bar barSize={20}dataKey="uv" xAxisId={1} fill="#ccc" /> <Bar dataKey="pv" barSize={20} xAxisId={0} fill="#8884d8" /> </BarChart> ); } }) ReactDOM.render( <SimpleBarChart />, document.getElementById('container') );
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!