This bug is actually due to a different recent change, in which I fixed the
half-cut-off first and last bars in the bar-like charts.  The case I missed
was when there is only one row of data, in which case it doesn't know how
wide the bars should be.  Zero rows of data might cause a related problem,
but my fix for this will catch both of those cases.  I'll see about
patching this change in the new release.


On Fri, Jul 5, 2013 at 10:00 AM, Daniel LaLiberte <[email protected]>wrote:

> I expect this is a bug that I introduced in my recent series of changes
> trying to rationalize the use of minValue and maxValue, as well as the
> viewWindow min and max, and the baseline.  I'm hopeful that I can add
> appropriate checks for this case of a single row of data, rather than
> merely retracting the changes.
>
> dan
>
>
> On Fri, Jul 5, 2013 at 2:07 AM, Jerome B <[email protected]> wrote:
>
>> I actually had found a (dirty) workaround just before seing your reply. I
>> was suspecting the date type to be a problem. By converting it to string, I
>> managed to get the bars to show:
>>
>>         var rebuiltData = new google.visualization.DataTable();
>>         for (i=0; i< currentDisplayData.getNumberOfColumns(); i++) {
>>             if (i == 0) {
>>                 rebuiltData.addColumn('string',
>> currentDisplayData.getColumnLabel(i));
>>             } else {
>>
>> rebuiltData.addColumn(currentDisplayData.getColumnType(i),
>> currentDisplayData.getColumnLabel(i));
>>             }
>>         }
>>         for (i=0; i< currentDisplayData.getNumberOfRows(); i++) {
>>             var colArr = new Array();
>>             for (j=0; j< currentDisplayData.getNumberOfColumns() ; j++ ) {
>>                 if (j==0) {
>>                     colArr.push(currentDisplayData.getFormattedValue(i,
>> j).toString());
>>                 } else {
>>                     colArr.push(currentDisplayData.getValue(i, j));
>>                 }
>>             }
>>             rebuiltData.addRow(colArr);
>>         }
>>
>>
>> Note that your workaround did work as well so I'm sure our problems are
>> related. I am using the candidate release (1.1). I have just tried with the
>> production release and get a different problem: the bars are showing but it
>> would show y-axis legend from 2000 to 2030 (not sure how it gets this idea
>> ?), although the series themselves are ok.
>>
>>
>>
>>
>> On Friday, July 5, 2013 12:20:54 PM UTC+7, asgallant wrote:
>>>
>>> I filed a bug report on this 
>>> here<http://code.google.com/p/google-visualization-api-issues/issues/detail?id=1255>,
>>> if you want to track it.
>>>
>>> On Friday, July 5, 2013 1:20:20 AM UTC-4, asgallant wrote:
>>>>
>>>> Are you using the production version or the release candidate (version
>>>> 1 or 1.1)?  I can duplicate the issue exactly in the release candidate, but
>>>> get a different (likely related) problem in the production version.
>>>>
>>>> I think this is a bug.  It appears that with a continuous axis, the
>>>> chart can't figure out how wide to make the bars when there is only one row
>>>> of data.  In the production version, your data draws the bars, but with the
>>>> vAxis having labels for 2000-2050 (see 
>>>> this<http://jsfiddle.net/asgallant/EKADZ/>).
>>>> In the RC, no bars get drawn (see 
>>>> this<http://jsfiddle.net/asgallant/EKADZ/1/>).
>>>> You can get around this for now by using setting the
>>>> vAxis.viewWindow.min/max options:
>>>>
>>>> vAxis: {
>>>>     viewWindow: {
>>>>         min: new Date(2013, 1, 0),
>>>>         max: new Date(2013, 1, 2)
>>>>     }
>>>> }
>>>>
>>>> like this: 
>>>> http://jsfiddle.net/asgallant/**EKADZ/4/<http://jsfiddle.net/asgallant/EKADZ/4/>
>>>>
>>>> On Thursday, July 4, 2013 9:37:09 PM UTC-4, Jerome B wrote:
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I've been turning this around for hours and can't figure out what's
>>>>> wrong with my data. The BarChart just won't display any bars of data (nor
>>>>> label). If I manually prepare the same array and pass it through
>>>>> arrayToDataTable, it would then work. I would greatly appreciate a fresh
>>>>> pair of eyes. Here is a toJSON output of the data table:
>>>>>
>>>>> {"cols":[{"id":"","label":"","**pattern":"","type":"date"},{"**
>>>>> id":"","label":"articles","**pattern":"","type":"number"},{**
>>>>> "id":"","label":"","pattern":"**","type":"number"},{"id":"","**label":"International
>>>>> relations","pattern":"","type"**:"number"},{"id":"","label":"**Rule
>>>>> of law","pattern":"","type":"**number"},{"id":"","label":"**National
>>>>> politics","pattern":"","type":**"number"},{"id":"","label":"**Human
>>>>> Rights","pattern":"","type":"**number"},{"id":"","label":"**
>>>>> Education","pattern":"","type"**:"number"},{"id":"","label":"**
>>>>> Economics","pattern":"","type"**:"number"},{"id":"","label":"**
>>>>> Environment","pattern":"","**type":"number"},{"id":"","**
>>>>> label":"Health","pattern":"","**type":"number"},{"id":"","**
>>>>> label":"Safety","pattern":"","**type":"number"}],"rows":[{"c":**[{"v":"Date(2013,
>>>>> 1, 1)","f":null},{"v":1817,"f":**null},{"v":1,"f":null},{"v":**
>>>>> 54,"f":null},{"v":697,"f":**null},{"v":177,"f":null},{"v":**
>>>>> 220,"f":null},{"v":72,"f":**null},{"v":349,"f":null},{"v":**
>>>>> 104,"f":null},{"v":57,"f":**null},{"v":86,"f":null}]}],"p"**:null}
>>>>>
>>>>> Thanks
>>>>>
>>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Visualization API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to
>> [email protected].
>> Visit this group at
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
>  - 978-394-1058
> [email protected] <[email protected]>   562D 5CC, Cambridge MA
> [email protected] <[email protected]> 9 Juniper Ridge
> Road, Acton MA
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   562D 5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to