Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

356
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda