Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!