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

115
Views
¿Cómo actualizar y desplazar mi gráfico a lo largo del eje x?

Estoy tratando de actualizar y cambiar mi gráfico a lo largo de su eje x, de modo que incluya un máximo de 5 valores en el eje x. Esto es lo que estoy tratando de lograr esencialmente. Esto es lo que tengo actualmente:

 <body> <div id="chart"></div> <script type="text/javascript"> var options = { chart: { id: 'realtime', height: 350, type: 'line', animations: { enabled: true, easing: 'easeinout', speed: 1000, dynamicAnimation: { enabled: true, speed: 1000 } } }, dataLabels: { enabled: false }, stroke:{ curve: 'smooth' }, series: [{ name: "Sales", data: mData() }], title: { text: 'Ajax Example', }, noData: { text: 'Loading...' } } var chart = new ApexCharts( document.querySelector("#chart"), options ); chart.render(); setInterval(function(){ chart.appendData([{ name: "Sales", data: mData() }]); }, 1000); </script> </body>

Mi código ya actualiza mi gráfico, pero ¿cómo puedo cambiar mi gráfico con el código actual que tengo?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede establecer el número máximo de elementos en xaxis como este

 xaxis:{ range: 5, },

https://apexcharts.com/docs/options/xaxis/#range

about 4 years ago · Santiago Trujillo 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!