@chrissky: In my example, all data is generated from the database on
the server as Javascript in JSPs and then a request is sent to Google
Viz API as:
google.load("visualization", "1", {packages:["columnchart"]});
google.setOnLoadCallback(draw);
function draw() {
var data = new google.visualization.DataTable();
// Add columns.
data.addColumn('string', 'id');
data.addColumn('number', 'sepatlength');
data.addColumn('number', 'sepalwidth');
data.addColumn('number', 'petallength');
data.addColumn('number', 'petalwidth');
// Set number of rows.
data.addRows(150);
// Add rows.
...
var chart = new
google.visualization.ColumnChart(document.getElementById('iris_visualisation'));
chart.draw(data, {width: 600, height: 400, title: '', titleX: '',
titleY: '', isStacked: false, is3D: false, pointSize: 5});
}
</script>
<div id = "iris_visualisation" ></div>
This works perfectly well and I have a two visualsiation page which
works happily without any reqId. So I am not sure of your comments
about reqId - can you clarify please?
Martin O'Shea.
On Jun 29, 6:12 am, chrissky <[email protected]> wrote:
> Just make sure to to pay attention to reqId.
>
> http://code.google.com/apis/visualization/documentation/dev/implement...
>
> Return the same value you receive. That recently got me.
>
> On Jun 28, 1:12 pm, MartinOShea <[email protected]> wrote:
>
>
>
> > Hello
>
> > I want to load 4 or maybe 6 visualisations of different types on to a
> > single page via a servlet or JSP which will serve as a welcome page to
> > my application. To reduce bandwidth and time, I want each
> > visualisation to contain only the most recent data read from a MySQL
> > database and this will be written as Javascript to the JSP which will
> > then call the Google Viz API.
>
> > Getting data from the database for one visualisation per page is
> > something I've done before but is there any advice you can give me
> > regarding populating multiple visualisations in one go?
>
> > An alternative is for me to may be to use images on the page which
> > will display the visualisations. I see the areachart, barchart, line
> > chart and pie chart are available as images but can you let me know
> > the status of the scatter chart and column chart?
>
> > Any help would be much appreciated.
>
> > Martin O'Shea.- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" 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-visualization-api?hl=en.