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

232
Vistas
Show value range in yAxis of nvd3 graph

We have a requirement where instead of showing a whole number we need to show a range in yAxis of nvd3 chart.

For example currently the yAxis values are 100, 200, 300.... 1000 or 150, 300, 450....1500. Instead of showing these whole number we need to show 0-99, 100-199.... 900-1000 or 0-149, 150-299, 300-449.... 1400-1500 etc.

The number of data points are always 10 in yAxis.

How can we achieve this solution ?

Example of a chart -

enter image description here enter image description here

Here is the code :-

 this.chartOptionsProgress = this.ChartHelper.options({
      type: 'multiBarHorizontalChart',
      height: 400,
      margin: {
        top: 10,
        right: 50,
        bottom: 20,
        left: 200
      },
      showValues: true,
      showLegend: false,
      valueFormat: function (d) {
        if (d == 0.01) {
          return "*";
        } else {
          return self.numberFilter.transform(parseInt(d));
        }
      },
      color: function (i) {
        return self.ChartHelper.defaultColors[0];
      }
      },
      showXAxis: true,
      showYAxis: true,
      forceY: [0],
      yAxis: {
        axisLabelDistance: 40,
        margin: {
          top: 30
        },
        tickFormat: (d) => {
          return this.numberFilter.transform(parseInt(d));
        }
      },
      xAxis: {
        margin: {
          right: 100
        }
      }
    });
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