Hi,

I am trying to draw a barchart with multiple x axes using the
Visualization Playground at 
http://code.google.com/apis/ajax/playground/?type=visualization#bar_chart
(below is the code that was used).

I am unable to make the values for the second x axes appear.
Everything else works fine. Both the series get scaled properly and
appear correct. How do I make the second x axes appear. I would like
it to appear at the top with values that show the correct scale for
the second series (values between 400 and 7460). Any ideas?

Thanks,
Kumar.

function drawVisualization() {
  // Create and populate the data table.
  var data = new google.visualization.DataTable();
         data.addColumn('string', 'Year');
        data.addColumn('number', 'Sales');
        data.addColumn('number', 'Expenses');
        data.addRows([
          ['2004', 1000, 400],
          ['2005', 1170, 7460],
          ['2006', 660, 1120],
          ['2007', 1030, 540]
        ]);

          var options = {
          width: 600, height: 400,
          chartArea:{left:80,top:100,width:"70%"},
            series:{0:{}, 1:{targetAxisIndex:1, visibleInLegend:
true}},
            hAxes:{ 0:{}, 1:{title:'Sales',textStyle:{color: 'red'}}},
          vAxis: {title: 'Year',  titleTextStyle: {color: 'red'}}
        };

  // Create and draw the visualization.
  new
google.visualization.BarChart(document.getElementById('visualization')).
      draw(data,options);
}
​

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to