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

80
Vistas
Is it possible to customize the chart.js y axis?

Nice to meet you. I'm making a chart with version chart.js3.6.2, and I want to make a label-like shape on the y-axis like an image. I tried to use generateLegend, but it was already deleted, where is the center code implemented in 3.x or higher? Thank you.

enter image description here - i want

=========================================

enter image description here - my code

            options : {
                plugins: {
                    
                    legend: {
                        display: false
                    },

                    autocolors: false,
                    annotation: {
                      annotations: {
                        line1: {
                          type: 'line',
                          yMin: 2.2,
                          yMax: 2.2,
                          borderDash: [4, 3],
                          borderColor: 'rgb(255, 99, 132)',
                          borderWidth: 1,
                        }, 
                        line2: {
                          type: 'line',
                          yMin: 2.4,
                          yMax: 2.4,
                          borderDash: [4, 3],
                          borderColor: 'rgb(255, 99, 132)',
                          borderWidth: 2,
                          label: {
                              enabled: true,
                              fontStyle: 'normal',
                              position: 'start',
                              content: 2.2,
                              backgroundColor:  'rgb(255, 99, 132)'
                        }
                        }
                      }
                    }
                  },
                responsive: true,
                spanGaps: true,

                scales: {
                    y: {
                        min:0,
                        max:max,
                        ticks: {
                            stepSize:0.2
                        }                    
                    },
                    x: {
                        grid:{
                            display: false,     
                        }
                    }
                 
                }, 
                gridLines:{
                            lineWidth:0
                        }
            }
        });
    }

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