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

113
Vistas
customize label colors in vue chart js

I am trying to change font colors of labels based on condition. My attempt is as below.

ticks: {
   fontColor:'red',
   userCallback: function (label, index, labels) {
       if (!label.flag) {
           //label.label[0] => set fontcolor of yellow
           //label.label[1] => set fontcolor of blue
           return label.label
        } else {
           return label.label
        }
    },
},

As in the above code I was able to add condition inside the ticks callback function and it's working fine. Now what I need is to add font colors as in the comments of the above code. Is there any way to access fontColor property inside ticks from callback method or any way to set different colors for the same label and render it?

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