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

140
Views
How can I set the timeline range in Apexcharts to a default to 1 month? The events not in the range can be scrolled horizontally

timeline date range

I'm working on a project and for better visibility I would like to display a daterange of max 4 weeks as default. There are timestamps in the future ahead, but it's not important to display them all at once. Scrolling horizontally will help with future timestamps.

this.chartOptions = {
  series: [
    {
      data: [
        {
          x: "System 34",
          y: [
            new Date("2019-03-02").getTime(),
            new Date("2019-03-04").getTime()
          ]
        },
        {
          x: "System 34",
          y: [
            new Date("2019-03-15").getTime(),
            new Date("2019-03-19").getTime()
          ]
        },
        {
          x: "System 34",
          y: [
            new Date("2020-03-15").getTime(),
            new Date("2020-03-19").getTime()
          ]
        },
        {
          x: "System 35",
          y: [
            new Date("2019-04-15").getTime(),
            new Date("2019-04-19").getTime()
          ]
        },
        {
          x: "System 36",
          y: [
            new Date("2019-03-04").getTime(),
            new Date("2019-03-08").getTime()
          ]
        },
        {
          x: "System 38",
          y: [
            new Date("2019-03-08").getTime(),
            new Date("2019-03-12").getTime()
          ]
        },
        {
          x: "System 39",
          y: [
            new Date("2019-03-12").getTime(),
            new Date("2019-03-18").getTime()
          ]
        }
      ]
    }
  ],
  chart: {
    height: 390,
    type: "rangeBar"
  },
  plotOptions: {
    bar: {
      horizontal: true
    }
  },
  xaxis: {
    type: "datetime",

  }
};

Is there a default zoom for the timeline range of the xaxis?

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!