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

93
Views
VictoryChart no cambia los datos de fecha

Tengo una tabla de victorias y dos ejes al mismo tiempo, siguiendo esta tabla

https://formidable.com/open-source/victory/gallery/multiple-dependent-axes/

No hay mucho que pueda describir, pero este gráfico ahora se ve así ingrese la descripción de la imagen aquí

Pero el problema es que no puedo cambiar los datos de fecha, aunque cambio la fecha

 <VictoryAxis crossAxis={true} tickCount={12} data={date} tickFormat={(x) => { console.log(x); return x.toLocaleString("vn-vn", { month: "short", day: "numeric" }); }} />

y los datos de la fecha

 const date = [ { x: new Date(2000, 3, 4) }, { x: new Date(2003, 4, 17) }, { x: new Date(2004, 1, 1) }, { x: new Date(2005, 1, 1) }, { x: new Date(2006, 1, 1) }, { x: new Date(2007, 2, 1) }, { x: new Date(2008, 1, 1) } ];

Pero siempre muestra el 1 jan , por favor ayuda

Esta es una demostración en vivo y datos

https://codesandbox.io/s/chart2-11eut?file=/src/App.js:776-1010

Muchas gracias

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Usa una matriz:

 const date = [ new Date(2000, 3, 4), new Date(2003, 4, 17), new Date(2004, 1, 1), new Date(2005, 1, 1), new Date(2006, 1, 1), new Date(2007, 2, 1), new Date(2008, 1, 1) ];

Modifique el JSX de la siguiente manera:

 <VictoryAxis crossAxis={true} tickValues={date} tickCount={date.length} tickFormat={(x) => { return x.toLocaleString("vn-vn", {month: "short", day: "numeric"}) } } />
about 4 years ago · Juan Pablo Isaza Report
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!