Thanks for help!
I inserted function inside query.send() expression, and now I can change
type of the first column to string. But, now this doesn't work! If I have a
number in the first column, ColumnChart works fine, but if I change it to a
string, I get an error: 'undefined' is not an object (evaluating 'b.count')
Here is the part of the code where I change 1st column values (it's inside
anonymous function in query.send() expression):
...
for (i = 0; i < data.getNumberOfRows(); i++) {
data.setCell(i, 0, set_weekday(data.getValue(i,0)));
}
...
And here is "set_weekday" function:
function set_weekday(i) {
var d="Mon";
switch (parseInt(i)) {
case 1: d="sun";break;
case 2: d="mon";break;
case 3: d="tue";break;
case 4: d="wed";break;
case 5: d="thu";break;
case 6: d="fri";break;
case 7: d="sat";break;
}
return d;
}
It changes week day numbers to strings.
If I display data in a Table - everything is fine.
What am I doing wrong?
--
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/-/KT888mbxxZkJ.
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.