Unexpected ouput along horizontal axis

10 views
Skip to first unread message

Todlerone

unread,
Aug 9, 2011, 4:24:25 PM8/9/11
to google-c...@googlegroups.com
Hello all and TY in advance for any help/suggestions.  I have
successfully added a stacked bar chart with Data Value Markers,
however, for the life of me I can't seem to get rid of an extra row
of
"0''s that have appeared.



Here is my code.....and again TY.


<div id="chart"></div>


<script type="text/javascript">


var queryString = '';


var dataUrl = '';


function onLoadCallback() {


if (dataUrl.length > 0) {


var query = new google.visualization.Query(dataUrl);


query.setQuery(queryString);


query.send(handleQueryResponse);



} else {


var dataTable = new google.visualization.DataTable();

dataTable.addRows(140);


<?php $numCOL = count($regions);


for($i=0; $i<$numCOL; $i++){


echo "dataTable.addColumn('number');\n";



}


$a=0;

$x=0;


foreach($courseMONTH as $key => $row):


if ($a<=12){


foreach ($row as $value):


echo"dataTable.setValue(".$a.", ".$x.", ".$value.");\n";


$x++;


endforeach;



}


$a++;$x=0;

endforeach;


?>


draw(dataTable);



}
}


function draw(dataTable) {

var vis = new
google.visualization.ImageChart(document.getElementById('chart'));


var options = {


chxl: '0:|July10|
Aug10|Sep10|Oct10|Nov10|Dec10|Jan11|Feb11|Mar11|Apr11|May11|June11|
July11|'­,


chds: 'a',


chxp: '',


chma: '30,30,30,30',


chm:
'N,000000,-1,,20|N,000000,0,,12,,c|N,ffffff,1,,12,,c|N,ffffff,
2,,12,,c|
N,ff­ffff,3,,12,,c|N,ffffff,4,,12,,c|N,ffffff,5,,12,,c|N,ffffff,
6,,12,,c|N,fffff­f,7,,12,,c|N,ffffff,8,,12,,c|N,ffffff,9,,12,,c',


chxr: '',


chxs: '',


chxtc: '',


chxt: 'x,y',


chbh: '40',


chs: '700x400',


cht: 'bvs',


chco:
'FDD017,436eee,FF9900,27408b,ff6a6a,ee6363,A2C180,8b3a3a,
3D7930,00ff00',


chdlp: 'b',


chdl: 'ABDO|BRAI|LIVR|LUNG|MEDI|NECK|PANC|PELB|SPIN|OTHR',


chtt: 'Monthly New Courses Started',


chts:'436eee,20,l'



};


vis.draw(dataTable, options);


}


function handleQueryResponse(response) {

if (response.isError()) {


alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());


return;



}


draw(response.getDataTable());


}


google.load("visualization", "1", {packages:["imagechart"]});

google.setOnLoadCallback(onLoadCallback);


</script>

Todlerone

unread,
Aug 18, 2011, 9:26:29 AM8/18/11
to Google Chart API
Is this possibly a bug in the core code? I have changed evrything I
could to see if I could get rid of the "0"'s but I can't......

On Aug 9, 4:24 pm, Todlerone <poke...@quickclic.net> wrote:
> Hello all and TY in advance for any help/suggestions.  I have
> successfully added a stacked bar chart with Data Value Markers,
> however, for the life of me I can't seem to get rid of an extra row
> of
> "0''s that have appeared.
>
> <https://lh6.googleusercontent.com/-DjVEZqBVSf8/TkGXXIXo4hI/AAAAAAAAAA...>

duniyadnd

unread,
Aug 21, 2011, 3:53:32 PM8/21/11
to google-c...@googlegroups.com
You'll probably get better luck asking in the appropriate group: https://groups.google.com/forum/#!forum/google-visualization-api
Reply all
Reply to author
Forward
0 new messages