Hi Nick - thanks for the help!

I believe I'm using a relative url, off of localhost. Here's a
representative page:

<!DOCTYPE html>
<html>
<head>
  <title>ESE Pct.</title>
  <!--Load the AJAX API-->
  <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
  <script type="text/javascript">

  // Load the Visualization API and the ready-made Google table
visualization.
  google.load("visualization", "1", {packages:
['corechart,table,annotatedtimeline']});

  // Set a callback to run when the API is loaded.
  google.setOnLoadCallback(init);

  // Send the queries to the data sources.
  function init() {

    query1 = new google.visualization.Query('ese?url=http://localhost:
8080/gv/11032010_trends_daily_p.csv&pivot=1&dtx=0&tr=0');
    query1.send(handleCsvDsResponse1);
  }

  // Handle the csv data source query response1
  function handleCsvDsResponse1(response) {
    if (response.isError()) {
      alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
      return;
    }

    var data = response.getDataTable();

    var formatter_short = new
google.visualization.DateFormat({formatType: 'short'});
    formatter_short.format(data, 0);

    var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
    chart.draw(data,{pointSize: 0, title: 'Event/Subevent (ESE)
Analysis - Percentages', hAxis: {slantedTextAngle: 70}});
  }

  </script>
</head>
<body>
  <div id='chart_div' style='width: 1650px; height: 490px;'></div>
  <div id="csv_div" style='width: 1650px; height: 400px;'</div>
</body>
</html>

The problem seems to be in the Query. Is there another url entry I
should be using
other than localhost? Also, I'm interested in GAE hosting the
datasource rather than
my host.

Let me know what you think - thanks

John

On Oct 12, 5:33 pm, Nick Johnson <[email protected]> wrote:
> Hi,
>
> It sounds like you've embedded the URL of your development environment into
> your code somewhere. Naturally, when deployed, your browser (or the
> Visualization API) can't access files stored on your local machine.
> Instead of hard-coding URLs, you should determine the host header from the
> current request -  exactly how to do so depends on your framework - and use
> that. Alternately, you can use relative URLs if the Visualization API
> supports that.
>
> -Nick Johnson
>
>
>
>
>
>
>
>
>
> On Thu, Oct 13, 2011 at 5:39 AM, uover82 <[email protected]> wrote:
> > Hi All,
>
> > I'm developing an application using app engine and the google
> > visualization api using java. It currently uses a static file (csv)
> > located in war as a datasource. My app works fine in my local
> > development server but fails with errors like the following after
> > uploading:
>
> > java.io.IOException: Could not fetch URL:http://localhost:8080/...
> > <csv path/filename>
>
> > Any ideas/thoughts on this?
>
> > Let me know - thanks
>
> > John
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > 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-appengine?hl=en.
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
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-appengine?hl=en.

Reply via email to