vineet
vineet

Reputation: 14266

How to remove right side text from google bar chart?

I am using google bar chart. I want to remove right side text with blue mini rectangle which i mark by red circle. Please see image below:-

enter image description here

Here is my code:-

var data = new google.visualization.DataTable();
      data.addColumn('string', 'Household Income');
      data.addColumn('number', 'Holder');
      data.addRows([
        ['Under 20K', resdata[0].un20],
        ['20 to 50K', resdata[0].fr20to50],
        ['50 to 75K', resdata[0].fr50to75],
        ['75 to 100K', resdata[0].fr75to100],
        ['100 to 150K', resdata[0].fr100to150],
        ['150 to 250K', resdata[0].fr150to250],
        ['250K and up', resdata[0].up250]
      ]);
      var options = {};
      // Instantiate and draw the chart.
      var chart = new google.visualization.BarChart(document.getElementById('myBarChart'));
      chart.draw(data, options);

Upvotes: 2

Views: 1268

Answers (1)

ssc-hrep3
ssc-hrep3

Reputation: 16099

Use legend.position = "none" in the initial configuration object. See the API docs (https://developers.google.com/chart/interactive/docs/gallery/barchart#configuration-options) for further explanations to the configuration options.

Upvotes: 3

Related Questions