Hi Daniel.
Thanks for answer.

But I receive the same error in other URL:


<html>
        <head>
          <meta http-equiv="content-type" content="text/html;
charset=utf-8">
          <script type="text/javascript" src="https://www.google.com/jsapi
"></script>
          <script type="text/javascript">
            google.load('visualization', '1', {packages:['corechart']});
            google.setOnLoadCallback(desenhaGrafico);
            function desenhaGrafico() {
              var wrapper = new google.visualization.ChartWrapper({
                dataSourceUrl:'
http://www.improving.com.br/api/test/hits-by-browser',
                chartType: 'AreaChart',
                containerId: 'meu_grafico',
                options:{width:900, height:300}
              });
              wrapper.draw();
            }
          </script>
        </head>
        <body>
          <div id="meu_grafico" />
        </body>
      </html>


And this URL the format is correct.
WHat can be?

2017-03-23 16:39 GMT-03:00 'Daniel LaLiberte' via Google Visualization API <
[email protected]>:

> When I visit that URL, I get this error message in a box:
>
> Error: Parse error on line 29: ...[ { "v": new Date(2011, 01, 0
> ---------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE',
> 'FALSE', '{', '['
>
> In strict JSON, you can't use the JavaScript new operator.  Maybe the
> timeout you see is related to that.
>
> The code you are returning from that URL, even without a syntax error, is
> not going to work with the ChartWrapper.  At the top, I see:
>
> google.visualization.Query.setResponse(
> { ...
>
> Which is a function call, not a JSON object.  I believe all you want is
> the value after your "table" property.
>
>
> On Thu, Mar 23, 2017 at 3:17 PM, Cristiano Pinheiro <[email protected]>
> wrote:
>
>> Hi.
>> I´m trying to do a simple chart using an external URL that returns a JSON:
>>
>> <html>
>>     <head>
>>     <meta http-equiv="content-type" content="text/html; charset=utf-8">
>>     <script type="text/javascript" src="https://www.google.com/js
>> api"></script>
>>     <script type="text/javascript">
>>     google.load('visualization', '1', {packages:['corechart']});
>>     google.setOnLoadCallback(desenhaGrafico);
>>     function desenhaGrafico() {
>>           var wrapper = new google.visualization.ChartWrapper({
>>           dataSourceUrl:'https://raw.github.com/caelum/caelum-online/
>> master/google-chart-tools/07-dados.json',
>>           chartType: 'AreaChart',
>>           containerId: 'meu_grafico',
>>           options:{width:900, height:300}
>>         });
>>           wrapper.draw();
>>        }
>>     </script>
>>         </head>
>>         <body>
>>           <div id="meu_grafico"> </div>
>>         </body>
>> </html>
>>
>> You can check the existence of URL by browser.
>> I´ve tried other valid URLs, but the result is the same.
>>
>> But I´m receiving the message
>> Request timed out
>> What can be?
>> Thanks in advance
>>
>> --
>> 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 google-visualization-api@googl
>> egroups.com.
>> Visit this group at https://groups.google.com/grou
>> p/google-visualization-api.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/google-visualization-api/5093181e-25f7-4c29-a11c-33b0d2
>> fc0370%40googlegroups.com
>> <https://groups.google.com/d/msgid/google-visualization-api/5093181e-25f7-4c29-a11c-33b0d2fc0370%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
> [email protected] <[email protected]>   5CC, Cambridge MA
>
> --
> 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/mMF2u5F53cI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to google-visualization-api@
> 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/CAOtcSJMiDpUwiJy81u9i4JxsLZh_
> jwNQ%3DWzv%3D2D-0M4DqN9jBA%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMiDpUwiJy81u9i4JxsLZh_jwNQ%3DWzv%3D2D-0M4DqN9jBA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 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/CAGa5HUmSC3xFfTZHBLB9Ac8vEiPgEsk%3Dd4y%2Bf6zGLCCu%3DHoNGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to