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

354
Views
All labels are not being shown in the x axis in Vue Apex Charts
xaxis: {
          type: this.domain_type,
          categories: this.domain,
          labels: {
            show: !this.isMobileOnly,
            style: {
              colors: this.range_color,
            },
            formatter: (val) =>{
                if(new Date(val).getMonth() === new Date().getMonth()) {
                  // only those dates that includes May in their name
                  // every label that I want is being shown except the May 2022 Label
                  // May 2022 does get returned here but doesn't get shown as a label on x-axis
                  return moment(val).format("MMM, YYYY");
                }
          },
          tickPlacement: 'on',
          axisBorder: {
            show: false,
          },
          axisTicks: {
            show: this.range_ticks,
          },
          tooltip: {
            enabled: this.range_tooltip,
          },
          tickAmount: undefined,
          offsetX: 28,
          },

I want to show all the labels in the x-axis in my apex chart component. In my formatter method, I check if the data (which is in the form of dates) includes the current month name irrespective to the year and if it does then, it should be rendered as a label in x-axis. All labels are being show in the x-axis except the last one that is May 2022. Why is the last label not being shown on the chart ?

X-axis Labels

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!