My chart was working in the morning, but now it shows: Bars series with value domain axis is not supported.

1,165 views
Skip to first unread message

Ricardo Viana Barreto

unread,
Jan 18, 2012, 2:14:17 PM1/18/12
to Google Visualization API
I got a code working pretty fine until today afternoon. The code is:

function drawChart(link, area, idmedicao) {
var data_barra = new google.visualization.DataTable();
data_barra.addColumn('number', 'max');
data_barra.addColumn('number', 'min');
data_barra.addColumn('number', 'med');
data_barra.addColumn('number', 'desvio');
data_barra.addColumn('number', 'P95');
data_barra.addColumn('number', 'P99');
data_barra.addRows(1);
data_barra.setCell(0, 0, max);
data_barra.setCell(0, 1, min);
data_barra.setCell(0, 2, med);
data_barra.setCell(0, 3, desvio_padrao);
data_barra.setCell(0, 4, p_95);
data_barra.setCell(0, 5, p_99);

var options = {
width: 400, height: 240,
title: 'Company Performance',
hAxis: {title: 'Year', titleTextStyle: {color: 'red'}}
};

var chart = new
google.visualization.ColumnChart(document.getElementById('barra'+area
+idmedicao));
chart.draw(data_barra, options);
}

Every thing was fine, this code was resulting in a column chart, but
looks like someone updated the source and changed everything without
documentation.

If someone knows where to find documentation about this recent change,
or knows how to make it work now, please help me.

Viz Kid

unread,
Jan 18, 2012, 3:36:09 PM1/18/12
to google-visua...@googlegroups.com

As of today's release, as we notified via email before, we require the first column to have the proper type.
For ColumnChart this means the first column must be of type string.

For more help, see our documentation:

And the more details description of ColumnChart:


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


searbe

unread,
Jan 19, 2012, 5:14:59 AM1/19/12
to google-visua...@googlegroups.com
Are we able to fix on today's release so we don't have to adjust for future API changes? Currently I'm loading version "1":

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

But ideally I'd load today's version specifically..?

asgallant

unread,
Jan 19, 2012, 11:36:04 AM1/19/12
to google-visua...@googlegroups.com
I believe if you set the 'strictFirstColumnType' option to false, your charts will work again.

Jinji

unread,
Jan 19, 2012, 11:52:57 AM1/19/12
to google-visua...@googlegroups.com
The API is generally backwards compatible. This was an exception, and some might argue even this is not an exception because we broke undocumented behavior.

To your question, no, there's currently no way to fix on a certain version.

And please, don't set 'strictFirstColumnType' option to false unless this if for a very limited amount of time. It'll break in the no-so-far future, as explained in http://code.google.com/apis/chart/interactive/docs/customizing_axes.html#Help

On Thu, Jan 19, 2012 at 6:36 PM, asgallant <drew_g...@abtassoc.com> wrote:
I believe if you set the 'strictFirstColumnType' option to false, your charts will work again.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
Reply all
Reply to author
Forward
0 new messages