I'm not 100% sure if this is intentional or a bug, but in case it's not 
considered a bug, consider this mail a feature request.

I think the underscore character (_) in data series should always be 
considered a null value and not be drawn on the chart as it is with basic 
text format ( 
http://code.google.com/apis/chart/image/docs/data_formats.html#text ). But 
this is not the case when using text format with custom scaling (with min 
value <= -1) or automatic scaling.

Here is a simplified demonstration of the problem:

http://code.google.com/apis/chart/image/docs/chart_playground.html?url=http%3A%2F%2Fchart.googleapis.com%2Fchart%3Fcht%3Dbvg%26chs%3D200x260%26chxt%3Dx%26chd%3Dt%3A-20%2C-10%2C0%2C_%2C10%2C20%26chds%3D-30%2C30%26chm%3DN*f1*%2C%2C0%2C%2C10%2C%2Cvc

http://chart.googleapis.com/chart?cht=bvg&chs=200x260&chxt=x&chd=t:-20,-10,0,_,10,20&chds=-30,30&chm=N*f1*,,0,,10,,vc

http://chart.googleapis.com/chart?cht=bvg&chs=200x260&chxt=x&chd=t:-20,-10,0,_,10,20&chds=a&chm=N*f1*,,0,,10,,vc

I want a bar chart with custom or automatic scaling and values less than -1 
and also have empty data points ("missing bars" represented by null values 
in the data series), but this didn't seem to be possible with the image bar 
chart API at the moment.

I have considered using the new Google Chart Tools in the future for new 
projects, but atm I already have a large system using the old image chart 
API, and it uses a type of bar chart that has multiple data series of values 
in the range [-2,2] and some null values are now incorrectly shown as -1 
instead of a missing bar, which is giving me a headache because -1 could 
also be a legal value for the chart.

Just before sending this mail I noticed one workaround for this though. By 
using custom scaling and replacing all your null underscore values with any 
actual value less than the minimum of the custom scale, the null bars aren't 
drawn. See this example:
http://chart.googleapis.com/chart?cht=bvg&chs=200x260&chxt=x&chd=t:-20,-10,0,-50,10,20&chds=-30,30&chm=N*f1*,,0,,10,,vc

-- 
Kari Söderholm

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-chart-api/-/kV9RlLuB9esJ.
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-chart-api?hl=en.

Reply via email to