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

170
Vistas
X axis labels with extra decimal...increase step to 1

i need help with line chart….i am providing h axis label as 15,16,17,18 but on the graph plotted i also get 15.5, 16.5….how to remove it??? i also used max: 4 in hAxis…still same issue....I also tried tickInterval: 1 but then graph is showing nothing .

<script>

        google.charts.load('current', {'packages':['line']});
  google.charts.setOnLoadCallback(drawChart);
        var val = {{valuess | tojson}}
        var tags = {{labelss | tojson}}
        var week_ranges = {{week_range  | tojson}}

   console.log(week_ranges)
function drawChart() {

  var data = new google.visualization.DataTable();
  for (i = 0; i < tags.length; i++){
    data.addColumn('number', tags[i]);
  }

  data.addRows(val);

  var options = {
    chart: {
      title: 'Incoming Tag Trends For  Resolver Group :  {{rg}}',
      subtitle: 'Year - {{year}}   Start Week - {{sweek}}   End Week - {{eweek}}'

    },
    width: 900,
    height: 500,
    hAxis : {
      viewWindow: {
        min: 1,
        max: week_ranges.length
      },
      ticks: week_ranges
    }
  };


  var chart = new google.charts.Line(document.getElementById('curve_chart'));


  chart.draw(data, google.charts.Line.convertOptions(options));
}
</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you can use the format config option to specify the number format of the ticks...

hAxis : {
  viewWindow: {
    min: 1,
    max: week_ranges.length
  },
  ticks: week_ranges,
  format: '#,##0'
}
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