0
votes

I've got Google Charts up and running, and it's working fine. The only thing is that the line chart Y-axis goes to -20,000, whilst there is no value beneath 0. I tried setting the minValue of both axis to 0, but when I add the 'vAxis'-part, it returns a 'undefined is not a function'. When I leave the 'vAxis'-part out of it, it works just fine... I was hoping anybody could help me with this?

    var options2 = {
      'width': 1920,
      'height': 1000,
      'chartArea':{
        'left': 70,
        'top': 50,
        'width': 1700,
        'height': 750, 
      },
      //'legend':'none',
      'curveType': 'function',
      //'titlePosition':'none',
       'backgroundColor':{fill: 'transparent'},
      'title': '',
      'lineSize':5,
      'hAxis':{
        'minValue':0,
        'viewWindowMode':'explicit',
        'viewMode':{
          'min': 0,
        },
        'textStyle':{
          'color':'white',
        },
      },
      'vAxis':{
        'minValue':0,
        'maxValue':50000,
        'viewWindowMode': 'explicit',
      'viewMode':{
        'min':0,
        'max':50000,
      },
      'textStyle':{
        'color':'white',
      },
      },
      'animation':{
        'duration':1000,
        'easing': 'out'
      },
      'pointSize': 15,
      };
1

1 Answers

0
votes

The appropriate option is vAxis.viewWindow, not vAxis.viewMode:

'vAxis':{
    'viewWindow':{
        'min':0,
        'max':50000,
    },
    'textStyle':{
        'color':'white',
    }
},