emilyanro

Update chart split result multiple charts

Recommended Posts

HI to all ,

 

:exclamation:

 

I have this situation ,

 

i have one jsp "test1.jsp " who create charts from database .

 

ex.

 

String chartCode1 = createChart("MSColumn2D.swf" , "ss", strXML , "CF1",260,250,false,true);

 

String chartCode11= createChart("AngularGauge.swf" , "ss", strXML1 , "CF11",360, 100,false,false);

 

at the page i have a button for refresh charts depends on filter (year/month)

 

I define a function function updateChart(year,month)

 

{

 

var url= "update.jsp?year=" +year+"&month="+month+"";

 

url = escape(url);

 

var chartObj = getChartFromId("CF1");

 

var chartObj1 = getChartFromId("CF11");

 

chartObj.setDataURL(url);

 

chartObj1.setDataURL(url);

 

}

 

 

 

 

in update.jsp i have 2 out.println. One for strXML and another for strXML1

 

How i can spit result for usage in this 2 chart.

Share this post


Link to post
Share on other sites

Hi

Please send another parameter to update.jsp, based on which it can out.println the specific xml only. Like this:

var url1= "update.jsp?year=" +year+"&month="+month+"&xmlCount=1";

var url2= "update.jsp?year=" +year+"&month="+month+"&xmlCount=2";

 

Then set the urls, like this,

chartObj.setDataURL(url1);

chartObj1.setDataURL(url2);

Hope this helps B)

Srividya

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now