Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

357
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda