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

235
Visualizações
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 à 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