Vinoth, How you go about doing this depends a lot on your application requirements. Google Charts is only concerned with what happens in the browser, so the JavaScript you would right only runs in the browser, and is dependent on what the server has given it in terms of data.
Since you say you are able to get a chart on page load, then if your post also generated a new page load, it might be easier to get that to work first. But if you want to stay on the same page after the Post, without redrawing the page, then you will have to use an AJAX mechanism to do the post and get the response without going to a new page. The response will typically only contain the changes to the page, or in your case, the data for your chart. Look into the ajax and json mechanisms documented here: https://developers.google.com/chart/interactive/docs/php_example . We don't have a JSP example, but it would be similar. Hope that helps give you some direction. On Wed, Nov 19, 2014 at 11:58 AM, vinoth kumar < [email protected]> wrote: > Hello, > > I am a java newbie and I need your help. I am using JSP servlets and MYSQL > for my project. I want to load a google line chart after submitting a form > and the form contains few dropdowns. Based on the options selected, the > page hits the database and fetches back the data and the chart should be > drawn. I am not able to get this output. I am able to get the chart on page > load by fetching the datas from db. But i am not able to do the same on > Post method after the user selecting their values in dropdown and subitting > the page. Plz help. > > -- > 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 > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- 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 http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
