bug?

151 views
Skip to first unread message

da

unread,
Apr 30, 2016, 12:32:49 PM4/30/16
to Google Visualization API

All of a sudden all FEB data is plotted in MARCH
I have had this running for over a year now but just saw this happen. Nothing has changed at all.

Any ideas?



Capture.JPG
Capture2.JPG

da

unread,
May 1, 2016, 1:20:52 AM5/1/16
to Google Visualization API
I isolated the data for OEF. As expected the data is good. But it is rendered wrong.
Capture3.JPG

da

unread,
May 1, 2016, 11:56:23 PM5/1/16
to Google Visualization API
Looks like someone fixed it. Thanks!

Daniel LaLiberte

unread,
May 2, 2016, 12:17:48 PM5/2/16
to Google Visualization API
Others are seeing this problem as well. We did not change Google Charts, so perhaps there is a change in the data?

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/e75c400c-8a57-4cd5-bad2-f770dad2dbaf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

da

unread,
May 2, 2016, 4:17:04 PM5/2/16
to Google Visualization API
Hello Daniel,

No change in data.

1. Friday - data updated. No chart problem.
2. Saturday and Sunday. - data is the same. Problem showed up.
3. Monday morning - still same data but the charts look good.

Attached the JSON as of Monday morning.


Best regards.



On Monday, May 2, 2016 at 9:17:48 AM UTC-7, Daniel LaLiberte wrote:
Others are seeing this problem as well. We did not change Google Charts, so perhaps there is a change in the data?
On Sun, May 1, 2016 at 11:56 PM, da <angu...@gmail.com> wrote:
Looks like someone fixed it. Thanks!




On Saturday, April 30, 2016 at 10:20:52 PM UTC-7, da wrote:
I isolated the data for OEF. As expected the data is good. But it is rendered wrong.




On Saturday, April 30, 2016 at 9:32:49 AM UTC-7, da wrote:

All of a sudden all FEB data is plotted in MARCH
I have had this running for over a year now but just saw this happen. Nothing has changed at all.

Any ideas?



--
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 google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--
Capture4.JPG

da

unread,
May 31, 2016, 3:28:03 AM5/31/16
to Google Visualization API
Hello Google Charts,

FYI

It happened again. February data is plotted in March.





On Saturday, April 30, 2016 at 9:32:49 AM UTC-7, da wrote:

GoogleChartsApiUser

unread,
May 31, 2016, 6:13:31 AM5/31/16
to Google Visualization API
We're seeing this as well. If we remove the min and max on the H-Axis, it starts working. else, the min and max seems to be interpreted incorrectly. This was working correctly till few hours back.

Volodymyr Naumenko

unread,
May 31, 2016, 6:17:39 AM5/31/16
to Google Visualization API
I have the same problem. In addition, November rendered like December...

Volodymyr Naumenko

unread,
May 31, 2016, 6:33:48 AM5/31/16
to Google Visualization API

GoogleChartsApiUser

unread,
May 31, 2016, 6:57:32 AM5/31/16
to Google Visualization API
It works correctly for months that have 31 days, and doesn't work for months with 30 or 28 days.

Daniel LaLiberte

unread,
May 31, 2016, 10:04:36 AM5/31/16
to Google Visualization API
I inserted a line chart using your data, and it looks fine to me:  


I believe the problem some people are seeing must involve an incompatibility with spreadsheet data and what charts expect.  Or perhaps there is a locale or timezone related issue. 


--
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 google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.



--

Volodymyr Naumenko

unread,
May 31, 2016, 10:10:26 AM5/31/16
to google-visua...@googlegroups.com
... but, using this data by google charts API, chart works wrong


Best regards,
Volodymyr Naumenko
...

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/sX0anYhk4fs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

Volodymyr Naumenko

unread,
May 31, 2016, 10:13:22 AM5/31/16
to google-visua...@googlegroups.com
<html>
  <head>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,dt-1.10.8/datatables.min.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript"
          modules: [{ name: 'visualization',
                      version: '1',
                      language: 'en',
                      packages:['corechart'] }] }">
</script>
    <script type="text/javascript">

      google.setOnLoadCallback(drawGIDlineKC1);

      function drawGIDlineKC1() {
        var queryStringKC1 = encodeURIComponent('SELECT A,B');
        var queryKC1 = new google.visualization.Query('https://docs.google.com/spreadsheets/d/1r7BnW-glT4594Usv9kCKiKmYDyBO6f9mCmcVzh3J2uk/edit?gid=0&headers=1&tq=' + queryStringKC1);

queryKC1.send(handleQueryResponseKC1);
}
function handleQueryResponseKC1(responseKC1) {
      if (responseKC1.isError()) {
        alert('Error in query: ' + responseKC1.getMessage() + ' ' + responseKC1.getDetailedMessage());
        return;
      }
   var dataKC1 = responseKC1.getDataTable();
   var optionsKC1 = {
     
          title: 'HEDGED PORTFOLIO GAIN / LOSS (ARABICA, $)',
          legend: 'top',
         
          width: 550,
          height: 350,
vAxis: { format:'0.0'},
hAxis: { format:'MMM-dd-yyyy'}
      
        };       

        var chartKC1 = new google.visualization.LineChart(document.getElementById('coffeeKC1'));
        chartKC1.draw(dataKC1, optionsKC1);
      }
    </script>
  </head>
  <body>
    <div id="coffeeKC1"></div>
  </body>
</html>


Best regards,
Volodymyr Naumenko
...

On Tue, May 31, 2016 at 5:04 PM, 'Daniel LaLiberte' via Google Visualization API <google-visua...@googlegroups.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/sX0anYhk4fs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

GoogleChartsApiUser

unread,
May 31, 2016, 10:38:32 AM5/31/16
to Google Visualization API
We resolved it in our page by removing hAxis.viewWindow min, max, and explicit. If we put those, the chart does render incorrectly as suggested in the above posts.


On Tuesday, May 31, 2016 at 4:04:36 PM UTC+2, Daniel LaLiberte wrote:
I inserted a line chart using your data, and it looks fine to me:  


I believe the problem some people are seeing must involve an incompatibility with spreadsheet data and what charts expect.  Or perhaps there is a locale or timezone related issue. 

On Tue, May 31, 2016 at 6:33 AM, Volodymyr Naumenko <naumenk...@gmail.com> wrote:
The same problem...
November rendered like December...



On Tuesday, May 31, 2016 at 1:13:31 PM UTC+3, GoogleChartsApiUser wrote:
We're seeing this as well. If we remove the min and max on the H-Axis, it starts working. else, the min and max seems to be interpreted incorrectly. This was working correctly till few hours back.


On Tuesday, May 31, 2016 at 9:28:03 AM UTC+2, da wrote:
Hello Google Charts,

FYI

It happened again. February data is plotted in March.





On Saturday, April 30, 2016 at 9:32:49 AM UTC-7, da wrote:

All of a sudden all FEB data is plotted in MARCH
I have had this running for over a year now but just saw this happen. Nothing has changed at all.

Any ideas?



--
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 google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

Volodymyr Naumenko

unread,
May 31, 2016, 11:03:21 AM5/31/16
to google-visua...@googlegroups.com
... charts have started to work incorrectly since May-30 2016. There where no changes in data...


Best regards,
Volodymyr Naumenko
...

On Tue, May 31, 2016 at 5:38 PM, GoogleChartsApiUser <mana...@gmail.com> wrote:
We resolved it in our page by removing hAxis.viewWindow min, max, and explicit. If we put those, the chart does render incorrectly as suggested in the above posts.

On Tuesday, May 31, 2016 at 4:04:36 PM UTC+2, Daniel LaLiberte wrote:
I inserted a line chart using your data, and it looks fine to me:  


I believe the problem some people are seeing must involve an incompatibility with spreadsheet data and what charts expect.  Or perhaps there is a locale or timezone related issue. 

On Tue, May 31, 2016 at 6:33 AM, Volodymyr Naumenko <naumenk...@gmail.com> wrote:
The same problem...
November rendered like December...



On Tuesday, May 31, 2016 at 1:13:31 PM UTC+3, GoogleChartsApiUser wrote:
We're seeing this as well. If we remove the min and max on the H-Axis, it starts working. else, the min and max seems to be interpreted incorrectly. This was working correctly till few hours back.


On Tuesday, May 31, 2016 at 9:28:03 AM UTC+2, da wrote:
Hello Google Charts,

FYI

It happened again. February data is plotted in March.





On Saturday, April 30, 2016 at 9:32:49 AM UTC-7, da wrote:

All of a sudden all FEB data is plotted in MARCH
I have had this running for over a year now but just saw this happen. Nothing has changed at all.

Any ideas?



--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/sX0anYhk4fs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

Daniel LaLiberte

unread,
May 31, 2016, 11:32:22 AM5/31/16
to Google Visualization API
I still haven't seen the problem myself, which makes it difficult to debug.  

It appears people are reporting the problem when getting data from spreadsheets, but it only shows up just before the end of each month.  

This problem may involve a recent change of how the string notation for dates, e.g. "Date(2015, 11, 1)", was parsed, though it is not yet clear how.  We have made an additional change which will be more robust, but this change won't make it to the version loaded with https://www.google.com/jsapi, at least not any time soon.    To get the latest updates, please use the new loader at https://www.gstatic.com/charts/loader.js.



For more options, visit https://groups.google.com/d/optout.



--

santiago...@etermax.com

unread,
May 31, 2016, 11:51:10 AM5/31/16
to Google Visualization API
Hi Daniel,

We're seeing the same problem, but our data is coming directly from Redshift (we are on a different locale however, but we're using a standard format).

This is the string the chart is receiving for the date value:

Mon May 30 2016 00:00:00 GMT-0300 (ART)

This has been working in production for the past year or so.

A hotfix is out of the question? If we have to change the loader everywhere, we might end up changing Gcharts all together and I'd rather not right now. 

Hope this helps somehow.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/sX0anYhk4fs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

--
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 google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

ri...@indeed.com

unread,
May 31, 2016, 12:09:53 PM5/31/16
to Google Visualization API

We are having the problem with line charts.  We are using 


and

google.load('visualization', '1', {'callback': doStuff});

I tried switching to https://www.gstatic.com/charts/loader.js and 

google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(doStuff);

That produced a good line chart.  But switching the library everywhere is also difficult for us.

Btw, the date values in our DataTable are all produced like this {"v":"Date(2016,0,1)"} in json passed to DataTable constructor.  I don't think there's anything wrong with the data.


Message has been deleted

da

unread,
May 31, 2016, 12:43:59 PM5/31/16
to Google Visualization API
1. My data comes from the JSON data coming from the GoogleCharts API (servlet)

2. Showed up just before the end of the month. Not all months. I noticed this last Feb (28 days) and May (31 days).

Note: March has 31 days but I didn't see this then.

GoogleChartsApiUser

unread,
May 31, 2016, 12:48:33 PM5/31/16
to Google Visualization API
For the benefit of everyone, I created a JS Fiddle showing the issue:


// Change Month to 0 (January - Works), 1 (February - Bug), or 2 (March - Works) to see the BUG
// Removing HAxis option will make it work
      


Daniel LaLiberte

unread,
May 31, 2016, 1:53:49 PM5/31/16
to Google Visualization API
It appears there are at least two different date-related bugs that have come up on the jspai loaded version.  

One problem involves dates that are specified with the string notation, e.g. "Date(2016, 4, 30)", which typically occurs when using JSON formatted values especially from spreadsheets.   The bug affects dates when the current date is just before the end of a month.

Another separate problem involves the use of the viewWindow with date values, resulting in the date being one month later.  This probably also affects the DateRangeFilter.   I'm not sure if this problem only shows up at the end of the month also, but we weren't hearing about it until now.


--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Collin Krawll

unread,
May 31, 2016, 5:29:01 PM5/31/16
to Google Visualization API
We were having problem number 1 listed by Daniel.  We were using the 'latest' version.  Switching to frozen version 44, as described here, fixed it.


On Tuesday, May 31, 2016 at 10:53:49 AM UTC-7, Daniel LaLiberte wrote:
It appears there are at least two different date-related bugs that have come up on the jspai loaded version.  

One problem involves dates that are specified with the string notation, e.g. "Date(2016, 4, 30)", which typically occurs when using JSON formatted values especially from spreadsheets.   The bug affects dates when the current date is just before the end of a month.

Another separate problem involves the use of the viewWindow with date values, resulting in the date being one month later.  This probably also affects the DateRangeFilter.   I'm not sure if this problem only shows up at the end of the month also, but we weren't hearing about it until now.

On Tue, May 31, 2016 at 12:48 PM, GoogleChartsApiUser <mana...@gmail.com> wrote:
For the benefit of everyone, I created a JS Fiddle showing the issue:


// Change Month to 0 (January - Works), 1 (February - Bug), or 2 (March - Works) to see the BUG
// Removing HAxis option will make it work
      





On Tuesday, May 31, 2016 at 6:43:59 PM UTC+2, da wrote:
1. My data comes from the JSON data coming from the GoogleCharts API (servlet)

2. Showed up just before the end of the month. Not all months. I noticed this last Feb (28 days) and May (31 days).

Note: March has 31 days but I didn't see this then.

--
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 google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--

jsta...@energyedge.com.au

unread,
Jun 20, 2016, 9:06:50 PM6/20/16
to Google Visualization API
Hi.

In anticipation of the end of month issue in a few days (29th June).

I found that dataview.toDataTable() and datatable.clone() were having trouble with the date replication.
It seems (without knowing the underlying code) that it is the order of the date creation.

Say, if the current date is 30-Jun-2016 and you want to create a date of 15-Feb-2015.
It appears to create a date from today (30-Jun-2016).
then change year = 30-Jun-2015
then change month = 30-Feb-2015 (which is converted to 2 Mar-2015)
then change day = 15-Mar-2015  (not 15-Feb-2015)

I believe it can be solved by initiating the date in .clone() and .toDataTable() with new Date(0) as opposed to new Date().

J

Daniel LaLiberte

unread,
Jun 20, 2016, 11:06:50 PM6/20/16
to Google Visualization API
Very accurate observation J.  We have a fix, that I still need to push out before it is too late, that avoids use of new Date() with no args (since the behavior would depend on the current day), but instead provides all the args at once.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

jsta...@energyedge.com.au

unread,
Jun 28, 2016, 6:46:52 PM6/28/16
to Google Visualization API
Short term solution for the .clone() and .toDataTable() issue with the live version of the Visualization.

Clone Usage:
prev: newDatatable = oldDatatable.clone();
now: newDatatable = cloneDataTable(oldDatatable);

ToDatatableUsage: 
prev: newDatatable = oldDataView.toDatatable();
now: newDatatable = convertDataViewToDataTable(oldDataView);

  
Functions:
    function cloneDataTable(dataTable) {
        var newDataTable = dataTable.clone();
        for (var c = 0; c < dataTable.getNumberOfColumns(); c++) {
            if (dataTable.getColumnType(c) == 'datetime' || dataTable.getColumnType(c) == 'date' ) {
                for (var r = 0; r < dataTable.getNumberOfRows() ; r++) {
                    newDataTable.setValue(r, c, dataTable.getValue(r, c));
                }
            }
        }
        return newDataTable;
    }

    function convertDataViewToDataTable(dataView) {
        var newDataTable = dataView.toDataTable();
        for (var c = 0; c < dataView.getNumberOfColumns(); c++) {
            if (dataView.getColumnType(c) == 'datetime' || dataView.getColumnType(c) == 'date' ) {
                for (var r = 0; r < dataView.getNumberOfRows(); r++) {
                    newDataTable.setValue(r, c, dataView.getValue(r, c));
                }
            }
        }
        return newDataTable;
    }

Hope this helps...
J


On Tuesday, June 21, 2016 at 1:06:50 PM UTC+10, Daniel LaLiberte wrote:
Very accurate observation J.  We have a fix, that I still need to push out before it is too late, that avoids use of new Date() with no args (since the behavior would depend on the current day), but instead provides all the args at once.
On Mon, Jun 20, 2016 at 9:06 PM, <jsta...@energyedge.com.au> wrote:
Hi.

In anticipation of the end of month issue in a few days (29th June).

I found that dataview.toDataTable() and datatable.clone() were having trouble with the date replication.
It seems (without knowing the underlying code) that it is the order of the date creation.

Say, if the current date is 30-Jun-2016 and you want to create a date of 15-Feb-2015.
It appears to create a date from today (30-Jun-2016).
then change year = 30-Jun-2015
then change month = 30-Feb-2015 (which is converted to 2 Mar-2015)
then change day = 15-Mar-2015  (not 15-Feb-2015)

I believe it can be solved by initiating the date in .clone() and .toDataTable() with new Date(0) as opposed to new Date().

J

On Wednesday, June 1, 2016 at 3:53:49 AM UTC+10, Daniel LaLiberte wrote:
It appears there are at least two different date-related bugs that have come up on the jspai loaded version.  

One problem involves dates that are specified with the string notation, e.g. "Date(2016, 4, 30)", which typically occurs when using JSON formatted values especially from spreadsheets.   The bug affects dates when the current date is just before the end of a month.

Another separate problem involves the use of the viewWindow with date values, resulting in the date being one month later.  This probably also affects the DateRangeFilter.   I'm not sure if this problem only shows up at the end of the month also, but we weren't hearing about it until now.

--
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 google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--
Reply all
Reply to author
Forward
0 new messages