Thanks for looking into it, VizGuy. If I end up with something that is reusable then I will submit it to the user charts directory.
On Jul 14, 8:56 am, VizGuy <[email protected]> wrote: > Hi Hasan, > I see now what you refer to (thanks for the additional info), but this > option is not supported by any of the charts in our gallery at the moment. > You might be able to customize the charts api's sparkline to do something > like that, but it will not be the same, and it is not simple to do. > > Regards, > VizGuy > > > > On Mon, Jul 13, 2009 at 7:10 PM, hasan <[email protected]> wrote: > > > Hi VizGuy > > > Thanks for help. I've collected some info, do let me know if you need > > more. > > > I have put a screenshot of what I have using the chart api: > >http://labeltop.com/research/Screenshot-Chart.png > > > This is what I am trying to achieve. The screenshot is of a desktop > > application that we made earlier. The charting is done using > > jfreechart base library and modifying it. We want to have a web app > > since many climate scientists are asking for it. > >http://labeltop.com/research/Screenshot-P301dx.png > > > Here is the client side javascript code I am using. It's pretty > > standard from the documentation. The query calls a servlet which > > returns a DataTable with 3 columns. The first column is Years, second > > is Sunpot (numeric) and third is Sigma (numeric). > > > <script type="text/javascript"> > > // Load the Visualization API and the piechart package. > > google.load('visualization', '1', {'packages':['scatterchart']}); > > </script> > > > <script type="text/javascript"> > > var data; > > > function getDataset() { > > //load the query > > var query = new google.visualization.Query('chart?user=' + < > > %out.print("'" + user + "'");%> + '&dataset=' + <%out.print("'" + > > dataset + "'");%>); > > > // Send the query with a callback function. > > query.send(handleQueryResponse); > > } > > > function handleQueryResponse(response) { > > > if (response.isError()) { > > alert('Error in query: ' + response.getMessage() + ' ' + > > response.getDetailedMessage()); > > return; > > } > > > var data = response.getDataTable(); > > > //create the chart > > var chart = new google.visualization.ScatterChart > > (document.getElementById('chartDiv')); > > > //draw it > > chart.draw(data, {width: 800, > > height: 600, > > titleX: 'Years', > > titleY: '', > > lineSize: 1, > > pointSize: 0, > > legend: 'right', > > axisFontSize: 10, > > titleFontSize: 10, > > legendFontSize: 10, > > enbleTooltip: true}); > > > } > > > // Set a callback to run when the API is loaded. > > google.setOnLoadCallback(getDataset); > > > </script> > > > Thanks > > Hasan > > > On Jul 13, 5:06 am, VizGuy <[email protected]> wrote: > > > Hi Hasan, > > > In order to make the problem more clear, it will be very helpful if you > > > could add some code snippet that demonstrates it. > > > > You might just send a code that we can copy and paste into the playground > > (http://code.google.com/apis/ajax/playground/?type=visualization) > > > or send a link to a live example, whatever is more convenient for you. > > > > Thanks, > > > VizGuy > > > > On Sun, Jul 12, 2009 at 11:31 PM, hasan <[email protected]> wrote: > > > > > Hi, > > > > I am using the scatter chart visualization. For charts with 1 curve > > > > (line) it works fine. But most of the time, I have to show multiple > > > > plots. By default, the chart shows multiple plots on top of each other > > > > on the same x and y axis. > > > > > How could I draw the two curves such that one is vertically above the > > > > other one. In this case, the y axis is repeated for the line which is > > > > at the top and the x axis is shared by both curves. We are using chart > > > > api for climate change studies and the charts must be in the format > > > > that academic journals are printed in, > > > > > Any advice? > > > > Thanks in advance. > > > > Hasan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
