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

198
Vistas
Highlight points in line chart thats value have out of range in ng2-charts

I want to display linechart but can't apply logic for outside range. If blood sugar level below 120 then should be highlight that point in orange dot. If blood sugar higher than 180 then should be highlight in red dot.

Use Chart: linechart of ng2-charts

dataset:

datasets: {
  "datasets":[{"label":"Blood Sugar","data": [70,180,120,90,110,240,550,40], "fill":false }],
  "labels":[ "low","high","normal","low","normal","high","high", "low" ],
}

Tried code:

"scales": { "yAxes":[{"display":false,"ticks":{"beginAtZero":true,"stepValue":10,"steps":10}}] }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Here is the solution for my question.

data: {
        labels: x_data,
        datasets: [
            {
                data: y_data,
                label: "Test Data",
                borderColor: "#3e95cd",
                fill: false,
                pointBackgroundColor: function(context) {
                    var index = context.dataIndex;
                    var value = context.dataset.data[index];
                    return value < 0 ? 'red' : 'green';
                }
            }
        ],
    }
about 4 years ago · Juan Pablo Isaza Denunciar
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