Novice Question

14 views
Skip to first unread message

Thomas Ritter

unread,
Apr 22, 2016, 9:25:41 PM4/22/16
to Google Visualization API

The code for the attached chart is shown below.....as you can see the customer names under the bars do not fit. I added the code for "SlantText" and it doesn't seem to work. What am I doing wrong?


function drawVisualization10() {
    var chartdata = {dialog.object}._data;
      
    var data = google.visualization.arrayToDataTable(chartdata);
var options = {
          
          series: {
            0: { axis: 'Price' },
            1: { axis: 'Tons' } 
          },
          
          hAxis: { slantedText:'true', slantedTextAngle:90 },
          
          axes: {
            y: {
              Price: {label: 'Dollars'}, // Left y-axis.
              Tons: {side: 'right', label: 'Tons'} // Right y-axis.
            }
          
          }
        };
        
      var chart = new google.charts.Bar(document.getElementById('visualization'));
      chart.draw(data, google.charts.Bar.convertOptions(options));
   
    };
   
Capture.JPG

Daniel LaLiberte

unread,
Apr 23, 2016, 8:52:52 PM4/23/16
to Google Visualization API
The slanttext options are not supported for the material charts.  You might want to use ColumnChart with theme: 'material' option to get the colors and fonts of the material style.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/1f7743ec-c130-4b45-ab35-6df8c3cdd3a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages