That happens when you use a continuous-type domain axis 
(number/date/datetime/timeofday).  Set the hAxis.viewWindow.min and 
hAxis.viewWindow.max options to values just outside your data range.  In 
your case, you might want to use May 2012 for the min and Dec 2012 for the 
max.

On Friday, November 16, 2012 1:41:20 PM UTC-5, Ed wrote:
>
>
> <https://lh5.googleusercontent.com/-gOJcqcGjmYo/UKaCHwRPLCI/AAAAAAAAAAM/pCM4uZBDlMA/s1600/barPosition.png>
> The code was written back in Jan of this year; I'm a n00b to the GV API 
> and just inherited the burden of fixing whatever is causing this.
> I checked the release 
> notes<https://google-developers.appspot.com/chart/interactive/docs/release_notes#migratingtocore>
>  for 
> everything since January and nothing jumps out.  Looking at the configuration 
> options<https://google-developers.appspot.com/chart/interactive/docs/gallery/columnchart#Configuration_Options>
>  there 
> doesn't appear to be a way for me to control where the columns are 
> positioned (please correct me if I'm wrong), so we must be pissing of the 
> GV API in some other way.
>
> I can't seem to run my code through the playground, either.  No error 
> messages come from the playground, just a mess of text.
>
> Thanks for any hints!
>
> Ed
>
>
> This is the entire js:
>
>     <script type="text/javascript">
>     var cdata = null;
>     var rdata = null;
>
>     var drawMChart = function()
>     {
>     var options = {
>       width: '100%', 
>       height: '100%', 
>       isStacked: true, 
>       legend: {position: 'none'}, 
>       chartArea: {width: '80%', height: '80%'}
>     }; 
>     
>     var chart = new 
> google.visualization.ColumnChart(document.getElementById('mchart'));
>     chart.draw(rdata, options);
>
>     google.visualization.events.addListener( chart, 'select',
>     function() {
>     var url = "/biz/dashboard/1310/revDetails.ajax";
>     var sel = chart.getSelection();
>     var dVal = rdata.getValue( sel[0].row, 0 );
>     var dFormat = new google.visualization.DateFormat({pattern: 
> "MM-dd-yyyy"});
>     url += '?date=' + dFormat.formatValue( dVal );
>     lightWindow( url );       
>     }
> );
>     }
>     
> google.load("visualization", "1", {packages:["corechart", "controls"]});
>  google.setOnLoadCallback(drawCharts);
>
> function drawCharts() 
> {
> var colors = ['gold','blue','purple','violet','orange','lightblue'];
>  // mChart
> {
> cdata = new google.visualization.DataTable();
> rdata = new google.visualization.DataTable();
>  var formatter = new google.visualization.NumberFormat( {prefix: '$', 
> negativeColor: 'red', negativeParens: true} );
> var dFormat = null;
>  dFormat = new google.visualization.DateFormat({pattern: "MMM"});
> rdata.addColumn( "date", 'Month' );
> cdata.addColumn( "date", 'Month' );
>
> cdata.addColumn( "number", "New" );
> cdata.addColumn( "number", "Repeat" );
>  rdata.addRows(6);
> cdata.addRows(6);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 0, 0, new Date('2012', '5', '1') );
> cdata.setValue( 0, 0, new Date('2012', '5', '1') );
>
> cdata.setValue( 0, 1, 167 );
> cdata.setValue( 0, 2, 31 );
>  rdata.setValue( 0, 1, 7882.01 );
> formatter.format(rdata, 1);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 1, 0, new Date('2012', '6', '1') );
> cdata.setValue( 1, 0, new Date('2012', '6', '1') );
>  cdata.setValue( 1, 1, 152 );
> cdata.setValue( 1, 2, 23 );
>  rdata.setValue( 1, 2, 7982.34 );
> formatter.format(rdata, 2);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 2, 0, new Date('2012', '7', '1') );
> cdata.setValue( 2, 0, new Date('2012', '7', '1') );
>  cdata.setValue( 2, 1, 104 );
> cdata.setValue( 2, 2, 25 );
>  rdata.setValue( 2, 3, 7994.36 );
> formatter.format(rdata, 3);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 3, 0, new Date('2012', '8', '1') );
> cdata.setValue( 3, 0, new Date('2012', '8', '1') );
>  cdata.setValue( 3, 1, 149 );
> cdata.setValue( 3, 2, 35 );
>  rdata.setValue( 3, 4, 9337.52 );
> formatter.format(rdata, 4);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 4, 0, new Date('2012', '9', '1') );
> cdata.setValue( 4, 0, new Date('2012', '9', '1') ); 
>
> cdata.setValue( 4, 1, 175 );
> cdata.setValue( 4, 2, 37 );
>  rdata.setValue( 4, 5, 9922.58 );
> formatter.format(rdata, 5);
>  rdata.addColumn( "number", 'Revenue' );
>  rdata.setValue( 5, 0, new Date('2012', '10', '1') );
> cdata.setValue( 5, 0, new Date('2012', '10', '1') ); 
>
> cdata.setValue( 5, 1, 50 );
> cdata.setValue( 5, 2, 19 );
>  rdata.setValue( 5, 6, 2572.78 );
> formatter.format(rdata, 6);
>
> if( dFormat != null )
> {
> dFormat.format( rdata, 0 );
> dFormat.format( cdata, 0 );
> }
>
> drawMChart();
> }
>  }
>     </script> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/QSWQSV5wFu0J.
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