Have interesting situation where some fo data set contains zero and null. 
Each has a specific meaning. Zero means "no money spent". NUll means "we 
dont have data".

Currently when we hit this in our data display we get a meaningless/at best 
ambiguous chart like the example attached. THe code is below.

What would be useful is to be able to add a text label to the bar or column 
which would enable us to describe the data meaning as above.

IS this possible? I cant find an example of null handling with zeros that 
gives a clue.

Any pointers from more seasoned GV API'ers most welcome :) 

// Load the Visualization API and the piechart package.
  google.load('visualization', '1.0', {'packages':['corechart']});

  // Set a callback to run when the Google Visualization API is loaded.
  google.setOnLoadCallback(drawChart);

  // Callback that creates and populates a data table,
  // instantiates the pie chart, passes in the data and
  // draws it.
  function drawChart() {

// Create the data table.
var data = new google.visualization.DataTable();

data.addColumn('string', 'Year(Type)');
data.addColumn('number', 'Recurrent'); 
data.addColumn('number', 'Capital'); 
data.addRows([['2012(Planned)',0,0]
        ]);

// Set chart options
        var options = {
height: 450,
width: 550,
focusTarget: 'category',
vAxis: {title: "% GDP"},
        hAxis: {title: ""},
isStacked: true, backgroundColor: '#F6F6F6'
        };

// Instantiate and draw our chart, passing in some options.
var chart = new 
google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
  }

-- 
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/-/Ak41wcNm8pYJ.
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.

<<attachment: example.png>>

Reply via email to