Set slanted text for Google Charts (Material Bar chart)

361 Views Asked by At

Have tried the following:

hAxis: {slantedText: true, slantedTextAngle: 90}

However this only works for core charts

I once needed to set the title on the material chart and used this work around:

series: {
          0: {targetAxisIndex: 0},
        },
      vAxes: {
          // Adds titles to each axis.
          0: {title: '# of Successes'},
      },

Wondering if the solution involves manipulating the code above

1

There are 1 best solutions below

1
king On

var options = {

      title: 'Nombre d emails par jour',
      hAxis: {title: 'Jour',  titleTextStyle: {color: '#333'},  slantedText: true},
      vAxis: {minValue: 0},
      
    };

    var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
    chart.draw(data, options);