Ranen

Members
  • Content count

    35
  • Joined

  • Last visited

Everything posted by Ranen

  1. Hello, Please refer to the attached image. I want 2d column charts with % value on top of the bar- tool tip must show the real value, I tried to do that but I did not get what I want. Little more explanation:- I have y-axis with max value,say, 1600. and column values,say, 899, 1120,1567. Now when I ask my chat to display column data as %, it shows like this 899%, 1120% or 1567% which I don't want, I want something like 899= 56.19% => how this comes => 899/1600 (NB = 1600 is the highest value of y-axis) and I also want tool tip with real value like for 899, it has to display 899 on move over the bar. Hope I am able to explain properly. Regards, Ranendra
  2. Hello, I have 2 portlets- related by drill down, 1st portlet - pie charts -->click on a Pie --> 2nd portlet opens as Bar charts. Now all the pies of the pie chart does not return same no of rows, so sometimes 2nd Portlet will have 5 bars and sometimes only 1 or 2. If I have more rows, size of the bar becomes smaller(width of the bar) but if the no of rows return by the drill down query is less, then size of the bar automatically becomes bigger. Now question is - is there any way we can control the size of the bar- I want consistent size. Please refer to the image. In image 1st pic has got only 3 bars and 2nd one has got 8 bars, 1st one does not look good. Regards
  3. 1 more point, the y-axis max value comes automatically depending on the data, in the above example, I said, its 1600, it can be 1900 or 90000 also. Is there anyway I can have a hold on the y axis max value?
  4. Bubble chart

    Hello, I have a question regarding bubble chat - in bubble chart x-axis label - it looks to me- we have to mention explicitly, but in case of y-axis- it comes automatically, look at below code- <chart palette='3' numberPrefix='$' is3D='1' xAxisMaxValue='100' showPlotBorder='0' xAxisName='Stickiness' yAxisName='Cost Per Service' chartRightMargin='30'> <categories> <category label='0%' x= '0'/> <category label='20%' x='20' showVerticalLine='1'/> <category label='40%' x='40' showVerticalLine='1'/> <category label='60%' x='60' showVerticalLine='1'/> <category label='80%' x='80' showVerticalLine='1'/> <category label='100%' x='100' showVerticalLine='1'/> </categories> <dataSet showValues= '0'> <set x='30' y='1.3' z='116' name='Traders'/> <set x='32' y='3.5' z='99' name='Farmers'/> <set x='8' y='2.1' z='33' name='Individuals'/> <set x='62' y='2.5' z='72' name='Medium Business Houses'/> <set x='78' y='2.3' z='55' name='Corporate Group A'/> <set x='75' y='1.4' z='58' name='Corporate Group C'/> <set x='68' y='3.7' z='80' name='HNW Individuals'/> <set x='50' y='2.1' z='105' name='Small Business Houses'/> </dataSet> <trendlines> <line startValue='2.5' isTrendZone= '0'displayValue='Median Cost' color='0372AB'/> </trendlines> <vTrendlines> <line startValue= '0'endValue='60' isTrendZone='1' displayValue='Potential Wins' color='663333' alpha='10'/> <line startValue='60' endValue='100' isTrendZone='1' displayValue='Cash Cows' color='990099' alpha='5'/> </vTrendlines> </chart> and also look at the image - the x-axis label like 20%, 40%, 60% etc are coming from xml file, but y-axis labels- $1,2$, $5 etc are coming automatically. Is there any way x-axis labels can also be come automatically? Let me know. Thanks, Ranen
  5. Hello, I have a question, I have got few Multi series 2D column chart and 1 single series column chart. I have labels in x-axis in both the charts- I want to reduce the label font in both places- I can do in multi series 2d column, but cannot in single series 2d Column. Here is my code for multi series column - "<chart caption='"+chartNameToDisplay1+"' xAxisName='"+xAxisValue+"' yAxisName='Transaction Count' showsum='0' " + " showValues='0' showBorder='1' plotSpacePercent='10' plotFillAlpha='80' bgColor='FFFFFF'><categories fontSize='8'>"; here fontSize='8 works for me How can I achieve same success in single series 2d column Plz refer to the image - look at Purchase/Redempt become 2 lines in label for single series 2d column. Regards, R
  6. Hello, I am facing a problem zoomline chart - my environment is - Liferay 6.1/J2EE. I created a drill down chart, where click a bullet chart- I should see a Zoomline chart. I get perfact result in chrome- I can zoom the line chart without any issue. But same application when I try to open in IE 9- it opens properly, but the zoomline does not work properly, I cannot see those 3 links just above the zoomline chart - Switch To Pin Mode, Reset Chart, Zoom out. Instead in IE 9 - I can see a pin in top right corner with 2 options - Switch to Pin mode, switch to zoom mode. But in Internet Explorer 9, I cannot do zooming- I cannot move the cursor/cannot make the chart bigger or smaller- in chrome it works fine. Can anyone tell me why is not behaving proper way in IE 9, or did I miss anything. I used JSP and normal java(- followed the example). Plz look at the screen shot attached Here is my xml file which need to create the zoomline chart - <chart caption='Daily Money Flows This Year Russell Investment Company' xAxisName='Date' yAxisName='Flows($)' numberPrefix='' showValues='0'> <categories> <category label='2012-07-13' /> <category label='2012-07-19' /> <category label='2012-07-25' /> <category label='2012-07-31' /> <category label='2012-08-06' /> <category label='2012-08-10' /> <category label='2012-08-16' /> <category label='2012-08-22' /> <category label='2012-08-28' /> <category label='2012-09-04' /> <category label='2012-09-10' /> <category label='2012-09-14' /> <category label='2012-09-20' /> <category label='2012-09-26' /> <category label='2012-10-02' /> <category label='2012-10-08' /> <category label='2012-10-12' /> <category label='2012-10-18' /> </categories> <dataset lineColor='E42217' seriesName='InFlows'><set value='92354424.7800' /><set value='200986397.3200' /><set value='31065522.9600' /> <set value='28975063.3900' /><set value='3588064945.4700' /><set value='92348138.1400' /><set value='306811476.8400' /><set value='70801083.7200' /> <set value='92868378.8000' /><set value='36435255.7900' /><set value='42277181.4600' /><set value='72280154.4400' /><set value='92109914.9500' /> <set value='54396975.2800' /><set value='39536487.4800' /><set value='30330782.0600' /><set value='100320315.3800' /><set value='29203036.2500' /> </dataset> <dataset lineColor='00FF00' seriesName='OutFlows'><set value='2266140496.0500' /><set value='42655520.1800' /><set value='44783331.8400' /> <set value='79740454.0200' /><set value='1904527641.8700' /><set value='109889237.6800' /><set value='201974849.3900' /><set value='64192527.0600' /> <set value='57963348.6700' /><set value='37967733.4300' /><set value='31286786.6900' /><set value='55229151.4300' /><set value='20659843.0100' /> <set value='57504093.2700' /><set value='120897067.8500' /><set value='45895271.1200' /><set value='106063841.9200' /><set value='28260669.3400' /> </dataset> <dataset lineColor='190714' seriesName='NetFlows'><set value='2550306.6100' /><set value='-69837219.0600' /><set value='-41644332.9600' /> <set value='-2173786071.2700' /><set value='-32232590.9700' /><set value='6114213.1100' /><set value='-2736878.3000' /><set value='158330877.1400' /> <set value='-23285814.1700' /><set value='7080912.5100' /><set value='-38234959.9200' /><set value='-13717808.8800' /><set value='174550713.0700' /> <set value='-61046444.8300' /><set value='-5821561.2900' /><set value='-50765390.6300' /><set value='-18645800.9300' /><set value='54057840.0000' /> <set value='-411620.0100' /><set value='1683537303.6000' /><set value='1227655754.6300' /><set value='-93187403.8800' /><set value='356415702.0200' /> <set value='-17541099.5400' /><set value='32213489.8200' /><set value='-3056502.8900' /><set value='1091826225.5100' /><set value='104836627.4500' /> <set value='79878698.8100' /><set value='38572404.9100' /><set value='1710768.7900' /><set value='6608556.6600' /><set value='269658.3700' /> <set value='22859445.1100' /><set value='-48104058.2900' /><set value='34905030.1300' /><set value='-22079264.2600' /><set value='19792667.9200' /> <set value='-50704204.4900' /><set value='-1532477.6400' /><set value='-1337910.0300' /><set value='29277616.0200' /><set value='-72281461.7000' /> <set value='10990394.7700' /><set value='142939.8100' /><set value='4945264.1800' /><set value='63097390.2500' /><set value='17051003.0100' /> <set value='-12667616.5900' /><set value='17395710.8900' /><set value='-23782279.1300' /><set value='71450071.9400' /><set value='-4578084.8200' /> <set value='966785.5500' /><set value='-2085233.0100' /><set value='-3107117.9900' /><set value='8861850.5900' /><set value='-34294118.5700' /> <set value='-87723853.0600' /><set value='-81360580.3700' /><set value='-8229357.2000' /><set value='-3113273.4800' /><set value='-8469299.8500' /> <set value='-15564489.0600' /><set value='-13651293.8600' /><set value='-3311586.5100' /><set value='6637908.3200' /><set value='-5743526.5400' /> <set value='-11468299.5800' /><set value='-8307107.0100' /><set value='3115446.2900' /><set value='942366.9100' /><set value='13087048.6700' /> <set value='-6348500.7500' /><set value='-51069127.8600' /> </dataset> </chart> And jsp:- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <%-- <c:set var="assetImagePath" value="/ChartHandler-portlet/JSP/assets/ui/images/" scope="request"/> --%> <%@page import="com.abc.web.bean.DashBoardThreeBean"%> <% DashBoardThreeBean dashBoardThreeBean = (DashBoardThreeBean)renderRequest.getAttribute("dashBoardThreeBean"); %> <tags:template2> <table> <tr> <td> <fc:render chartId="${dashBoardThreeBean.lineChartDDChartId}" swfFilename="/ChartHandler-portlet/FusionCharts/ZoomLine.swf" width="420" height="300" debugMode="false" registerWithJS="false" xmlData="${dashBoardThreeBean.lineChartDDXml}" /> </td> </tr> </table> </tags:template2>
  7. zoomline charts in IE 9

    Just a reminder - My IE is 9 and 64 bit
  8. Hello Experts, I have a question, I am doing project where we use Fushioncharts as our client UI, we got mix charts and widget, most of the time we have fushionchartsXT, going documentation its mentioned that Fushioncharts work fine with and without Flash player, today I tested disabling and uninstalling the flash player it works fine, but we have bullet chart(VBullet.swf), I tried to test this without flash player, it did not work. Now question- does Fushion widget does not work without Flash player? If it works without flash player- how can I make it work? Let me know the answer. Thanks, R
  9. Hello Guys, Does anyone has any drill down chart working example with Liferay as server? Here is my issue:- I created a portlet which displays 2 charts(pie and column(=MSColumn2D.swf)), now I want to drill down in the pie. To do that I have a link in the pie chart's xml. I used javascript function for that, now Pie charts comes up, click on a pie, using java script, I can got to java Controller which creates the drill down xml dynamically and populate the data in the jsp, but I cannot see the jsp. Here is my flow - Portlet with 2 charts --> click on pie-->control comes to Portlet Controller-->portlet controller creates a dynamic xml,pass the data to new jsp But I cannot see the new jsp with the drill down chart. So, can the experts tell me where I am wrong. Here is my code snippet:- First Jsp = <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="title" value="FusionCharts - Array Example using Single Series Column 3D Chart" scope="request"/> <c:set var="header1" value="FusionCharts - Examples" scope="request"/> <c:set var="header2" value=" " scope="request"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <c:set var="assetCSSPath" value="/ChartHandler-portlet/JSP/assets/ui/css/" scope="request"/> <c:set var="assetJSPath" value="/ChartHandler-portlet/JSP/assets/ui/js/" scope="request"/> <c:set var="assetImagePath" value="/ChartHandler-portlet/JSP/assets/ui/images/" scope="request"/> <%@page import="com.bfds.web.bean.PieColumnChartBean"%> <%@page import="com.bfds.web.bean.PieDetailBean"%> <% PieColumnChartBean pieColumnChartBean = (PieColumnChartBean)renderRequest.getAttribute("pieColumnChartBean"); %> <SCRIPT LANGUAGE="JavaScript"> function myJS(myVar){ window.alert(myVar); var url = '<portlet:renderURL></portlet:renderURL>'; jQuery.post(url,{tradeOrigin : myVar},function() { }); } </SCRIPT> <div> <div class="left"> <tags:template2> <fc:render chartId="${pieColumnChartBean.chartIdPie}" swfFilename="/ChartHandler-portlet/FusionCharts/Pie2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.pieXml}" /> </tags:template2> </div> <div class="right"> <tags:template2> <fc:render chartId="${pieColumnChartBean.chartIdColumn}" swfFilename="/ChartHandler-portlet/FusionCharts/MSColumn2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.columnXml}" /> </tags:template2> </div> </div> Second Jsp(drill down one):: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="title" value="FusionCharts - Array Example using Single Series Column 3D Chart" scope="request"/> <c:set var="header1" value="FusionCharts - Examples" scope="request"/> <c:set var="header2" value=" " scope="request"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <c:set var="assetCSSPath" value="/ChartHandler-portlet/JSP/assets/ui/css/" scope="request"/> <c:set var="assetJSPath" value="/ChartHandler-portlet/JSP/assets/ui/js/" scope="request"/> <c:set var="assetImagePath" value="/ChartHandler-portlet/JSP/assets/ui/images/" scope="request"/> <%@page import="com.bfds.web.bean.PieDetailBean"%> <% PieDetailBean pieDetailBean = (PieDetailBean)renderRequest.getAttribute("pieDetailBean"); %> <div> <div class="left"> <tags:template2> <fc:render chartId="${pieDetailBean.chartIdPieDetail}" swfFilename="/ChartHandler-portlet/FusionCharts/Column2D.swf" width="450" height="300" debugMode="true" registerWithJS="false" xmlData="${pieDetailBean.pieDetailXml}" /> </tags:template2> </div> </div> Java Controller:- public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException{ if(renderRequest.getParameter("chartName") !=null && renderRequest.getParameter("chartName").equals("PieColumn Chart")){ PieColumnChartBean pieColumnChartBean = new PieColumnChartBean(); renderRequest.setAttribute("pieColumnChartBean", pieColumnChartBean); viewJSP = "/JSP/pieColumn.jsp"; } else if(tradeOrigin!=null && tradeOrigin.length() >0){ PieDetailBean pieDetailBean = new PieDetailBean(tradeOrigin); renderRequest.setAttribute("pieDetailBean", pieDetailBean); viewJSP = "/JSP/pieDetail.jsp"; } include(viewJSP, renderRequest, renderResponse); }
  10. Haritha or anyone from support team, can you plz help me solving this issue,I just want to know how did u successfully implemnted Drill down fusionchart in liferay?
  11. And few .js files are loaded from liferay-portket.xml and correctly loaded- <?xml version="1.0"?> <!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd"> <liferay-portlet-app> <portlet> <portlet-name>ChartHandler</portlet-name> <icon>/icon.png</icon> <instanceable>true</instanceable> <header-portlet-css>/css/test.css</header-portlet-css> <footer-portlet-javascript>/js/test.js</footer-portlet-javascript> </portlet> <portlet> <portlet-name>DisplayHandler</portlet-name> <icon>/icon.png</icon> <instanceable>true</instanceable> <header-portlet-css>/css/test.css</header-portlet-css> <footer-portlet-javascript>/js/test.js</footer-portlet-javascript> <!-- <header-portlet-css>/JSP/assets/ui/css/style.css</header-portlet-css> --> <footer-portlet-javascript>/js/FusionCharts.js</footer-portlet-javascript> <footer-portlet-javascript>/JSP/assets/ui/js/jquery-1.4.2.min.js</footer-portlet-javascript> <footer-portlet-javascript>/JSP/assets/ui/js/lib.js</footer-portlet-javascript> </portlet> <portlet> <portlet-name>PieDrillDown</portlet-name> <icon>/icon.png</icon> <instanceable>true</instanceable> <header-portlet-css>/css/test.css</header-portlet-css> <!-- <header-portlet-css>/JSP/assets/ui/css/style.css</header-portlet-css> --> <footer-portlet-javascript>/js/FusionCharts.js</footer-portlet-javascript> <footer-portlet-javascript>/JSP/assets/ui/js/jquery-1.4.2.min.js</footer-portlet-javascript> <footer-portlet-javascript>/JSP/assets/ui/js/lib.js</footer-portlet-javascript> </portlet> <role-mapper> <role-name>administrator</role-name> <role-link>Administrator</role-link> </role-mapper> <role-mapper> <role-name>guest</role-name> <role-link>Guest</role-link> </role-mapper> <role-mapper> <role-name>power-user</role-name> <role-link>Power User</role-link> </role-mapper> <role-mapper> <role-name>user</role-name> <role-link>User</role-link> </role-mapper> </liferay-portlet-app>
  12. Further findings:- Situation 1:- I got the Piechart in the browser. Click on a pie- expected result- 2D column chart should display under the piechart, but not displaying, just empty jsp. I debugged here using chrome developer tool - I found below html code inside the debugger:- <div class="gen-chart-render"> <table> <tbody><tr> <td> <!-- START Script Block for Chart --> <div id="Div" align="center"><span id=""></span></div> <script type="text/javascript"> var chart_ = new FusionCharts({"registerWithJS":"0","height":"300","id":"","renderAt":"Div","dataFormat":"xml","swfUrl":"/ChartHandler-portlet/FusionCharts/Column2D.swf","debugMode":"0","width":"450"}).render(); </script> <!--END Script Block for Chart --> </td> </tr> </tbody></table> </div> NB - I printed the pieDetailXml from pieDetailBean - it printed in the console, so the xml file is inside the jsp, but when I debug the jsp, I cannot see the xml data.(plz look above- there is no xml data) Situation 2:- Now I refresh the page - right click reload - now I can see the pie chart and the drill down 2D column chart and I debugged the code, here is the out put <div class="gen-chart-render"> <table> <tbody><tr> <td> <div id="transactionPieDetailDiv" align="center"> <object type="application/x-shockwave-flash" lang="EN" class="FusionCharts" data="/ChartHandler-portlet/FusionCharts/Column2D.swf" width="450" height="300" id="transactionPieDetail" style="visibility: visible;"> <param name="scaleMode" value="noScale"> <param name="scale" value="noScale"> <param name="wMode" value="opaque"> <param name="allowScriptAccess" value="always"> <param name="quality" value="best"> <param name="flashvars" value="lang=EN&debugMode=0&dataXML=%3Cchart%20caption%3D'Russell%20Investment%20Company'%20xAxisName%3D'Transaction%20Count'%20yAxisName%3D'Transactions'%20numberPrefix%3D''%20showValues%3D'0'%3E%3Cset%20label%3D'CANCEL'%20value%3D'87'%2F%3E%3Cset%20label%3D'EXCHANGE'%20value%3D'1442'%2F%3E%3Cset%20label%3D'PURCHASE'%20value%3D'37323'%2F%3E%3Cset%20label%3D'REDEMPT'%20value%3D'41248'%2F%3E%3Cset%20label%3D'TRANSFEE'%20value%3D'3'%2F%3E%3Cset%20label%3D'TRANSFER'%20value%3D'10093'%2F%3E%3C%2Fchart%3E&DOMId=transactionPieDetail&registerWithJS=1&chartWidth=450&chartHeight=300&InvalidXMLText=Invalid data.&dataURL="> </object> </div> <script type="text/javascript"> var chart_transactionPieDetail = new FusionCharts({"registerWithJS":"0","height":"300","id":"transactionPieDetail","renderAt":"transactionPieDetailDiv","dataFormat":"xml","swfUrl":"/ChartHandler-portlet/FusionCharts/Column2D.swf","dataSource":"<chart caption='Russell Investment Company' xAxisName='Transaction Count' yAxisName='Transactions' numberPrefix='' showValues='0'><set label='CANCEL' value='87'/><set label='EXCHANGE' value='1442'/><set label='PURCHASE' value='37323'/><set label='REDEMPT' value='41248'/><set label='TRANSFEE' value='3'/><set label='TRANSFER' value='10093'/></chart>","debugMode":"0","width":"450"}).render(); </script> <!--END Script Block for Chart transactionPieDetail--> </td> </tr> </tbody></table> And the above code has got the xml content, I just refresh, never click any pie. So why is it behaving this way? any idea?
  13. This is the first controller:- import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Event; import javax.portlet.EventRequest; import javax.portlet.EventResponse; import javax.portlet.GenericPortlet; import javax.portlet.PortletException; import javax.portlet.PortletRequestDispatcher; import javax.portlet.PortletSession; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import javax.portlet.ProcessEvent; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; import javax.xml.namespace.QName; import com.bfds.web.bean.PieColumnChartBean; import com.bfds.web.bean.PieDetailBean; import com.bfds.web.bean.PurRedNetBean; import com.bfds.web.bean.PurRedNetForZoomlineChartRecords; import com.bfds.web.bean.PurRedNetZoomlineBean; import com.bfds.web.bean.TransactionBarChartBean; import com.bfds.web.wsconsumer.ChartWSConsumer; import com.liferay.util.bridges.mvc.MVCPortlet; public class BFDSChartDisplayController extends MVCPortlet{//GenericPortlet{ String viewJSP=null; public void init(){ } public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException{ System.out.println("<<<<<<<<<<<<<<< BFDSChartDisplayController >>>>>>>>>>>>>>>>>>> doView "); ChartWSConsumer chartWSConsumer = new ChartWSConsumer(); PurRedNetForZoomlineChartRecords purRedNetForZoomlineChartRecords = chartWSConsumer.getZoomLineChartData(); PortletSession portletSession = renderRequest.getPortletSession(); portletSession.setAttribute("purRedNetForZoomlineChartRecords", purRedNetForZoomlineChartRecords); TransactionBarChartBean transactionBarChartBean = null; PurRedNetZoomlineBean purRedNetZoomlineBean = null; if(renderRequest.getParameter("chartName") !=null){ if(renderRequest.getParameter("chartName").equals("Transaction Chart")){ transactionBarChartBean = new TransactionBarChartBean(); transactionBarChartBean.constructXML1(purRedNetForZoomlineChartRecords); renderRequest.setAttribute("transactionBarChartBean", transactionBarChartBean); viewJSP = "/JSP/transactionBarChart.jsp"; } else if(renderRequest.getParameter("chartName").equals("Zoomline Chart")){ purRedNetZoomlineBean = new PurRedNetZoomlineBean(); purRedNetZoomlineBean.constructXML(purRedNetForZoomlineChartRecords); renderRequest.setAttribute("purRedNetZoomlineBean", purRedNetZoomlineBean); viewJSP = "/JSP/zoomLineChart.jsp"; } else if(renderRequest.getParameter("chartName").equals("PieColumn Chart")){ System.out.println("<<<<< in the controller to get pie-column chart >>>>>"); PieColumnChartBean pieColumnChartBean = new PieColumnChartBean(); renderRequest.setAttribute("pieColumnChartBean", pieColumnChartBean); viewJSP = "/JSP/pieColumn.jsp"; } // else if(tradeOrigin!=null && tradeOrigin.length() >0){ // System.out.println("doView >>>> tradeOrigin >>>>> 1 == "+ tradeOrigin); // PieDetailBean pieDetailBean = new PieDetailBean(tradeOrigin); // System.out.println("doView >>>> tradeOrigin >>>>> 2 == "+ tradeOrigin); // renderRequest.setAttribute("pieDetailBean", pieDetailBean); // System.out.println("doView >>>> tradeOrigin >>>>> 3 == "+ tradeOrigin); // //viewJSP = "/JSP/pieDetail.jsp"; // viewJSP = "/JSP/pieColumn.jsp"; } include(viewJSP, renderRequest, renderResponse); } public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { String tradeOrigin = request.getParameter("tradeOrigin"); System.out.println(" BFDSChartDisplayController <<<<<<<<<< processAction <<<<<<<< tradeOrigin = "+ tradeOrigin); request.setAttribute("tradeOrigin", tradeOrigin); QName qname = new QName("http://liferay.com/events","tradeOrigin.data"); System.out.println(" BFDSChartDisplayController <<<<<<<<<< processAction <<<<<<<< qname = "+ qname.getLocalPart() + "::::" +qname.getNamespaceURI()); response.setEvent(qname, tradeOrigin); } @Override public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException { System.out.println("<<<<<<<<<< in serveResourcse >>>>>>>>>>>>>>>."); String jsp = null; response.setContentType("text/html"); String resourceId = request.getResourceID(); System.out.println("resourceId >>> = "+ resourceId); String tradeOrigin = request.getParameter("tradeOrigin"); System.out.println("tradeOrigin >>> = "+ tradeOrigin); } protected void include(String path, RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); if (portletRequestDispatcher == null) { System.out.println(path + " is not a valid include"); } else { portletRequestDispatcher.include(renderRequest, renderResponse); } } @ProcessEvent(qname = "{http://liferay.com/events}chart.data") public void receiveEvent(EventRequest request, EventResponse response) { Event event = request.getEvent(); String chartName = (String)event.getValue(); System.out.println(" BFDSChartDisplayController >>>>>>>>receiveEvent>>>>>>>>> chartName = " + chartName); response.setRenderParameter("chartName", chartName); } } This is the second controller:- import java.io.IOException; import javax.portlet.Event; import javax.portlet.EventRequest; import javax.portlet.EventResponse; import javax.portlet.GenericPortlet; import javax.portlet.PortletException; import javax.portlet.PortletRequestDispatcher; import javax.portlet.ProcessEvent; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import com.bfds.web.bean.PieDetailBean; import com.liferay.util.bridges.mvc.MVCPortlet; public class BFDSPieChartDrillDownController extends MVCPortlet{//GenericPortlet{ String viewJSP=null; public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException{ System.out.println("<<<<<<<<<<<<<<< BFDSPieChartDrillDownController >>>>>>>>>>>>>>>>>>> doView "); String tradeOrigin = renderRequest.getParameter("tradeOrigin"); //tradeOrigin ="TRADE-ORIGIN-NSCC"; System.out.println("BFDSPieChartDrillDownController>>>>>doView >>>> tradeOrigin >>>>> 3 == "+ tradeOrigin); if(tradeOrigin!=null && tradeOrigin.length() >0){ PieDetailBean pieDetailBean = new PieDetailBean(tradeOrigin); renderRequest.setAttribute("pieDetailBean", pieDetailBean); viewJSP = "/JSP/pieDetail.jsp"; } System.out.println("BFDSPieChartDrillDownController >>>> doView >>>> tradeOrigin >>>>> 4 == "+ tradeOrigin); include(viewJSP, renderRequest, renderResponse); } protected void include(String path, RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); System.out.println("<<<<<<<include<<<<<<<< BFDSPieChartDrillDownController >>>>>>>>>>>>>>>>>>> path >>> =" +path); System.out.println("<<<<<<<include<<<<<<<< BFDSPieChartDrillDownController >>>>>>>>>>>>>>>>>>> portletRequestDispatcher >>> =" +portletRequestDispatcher); if (portletRequestDispatcher == null) { System.out.println(path + " is not a valid include"); } else { portletRequestDispatcher.include(renderRequest, renderResponse); } } @ProcessEvent(qname = "{http://liferay.com/events}tradeOrigin.data") public void receiveEvent(EventRequest request, EventResponse response) { Event event1 = request.getEvent(); String tradeOrigin = (String)event1.getValue(); System.out.println(" BFDSPieChartDrillDownController >>>>>>>>receiveEvent>>>>>>>>> tradeOrigin = " + tradeOrigin); response.setRenderParameter("tradeOrigin", tradeOrigin); } }
  14. PieColumnChartBean - first cha import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import com.bfds.web.wsconsumer.ChartWSConsumer; import com.fusioncharts.FusionChartsHelper; import com.fusioncharts.sampledata.ChartType; public class PieColumnChartBean { private String heightPie = "300"; private String widthPie = "450"; private String heightColumn = "300"; private String widthColumn = "450"; private String pieXml; private String columnXml; private String chartIdPie = "transactionPie"; private String chartIdColumn = "transactionColumn"; private String url = null; private String filename = ChartType.COLUMN3D.getFileName(); public PieColumnChartBean(){ ChartWSConsumer chartWSConsumer = new ChartWSConsumer(); PieColumnChartRecords pieColumnChartRecordsForPie = chartWSConsumer.getPieColumnChartQueryForPie(); PieColumnChartRecords pieColumnChartRecordsForColumn = chartWSConsumer.getPieColumnChartQueryForColumn(); Map<String, PieColumnChartRecords> map = new HashMap<String, PieColumnChartRecords>(); map.put("Pie", pieColumnChartRecordsForPie); map.put("Column", pieColumnChartRecordsForColumn); constructXML(map); } public String getHeightPie() { return heightPie; } public void setHeightPie(String heightPie) { this.heightPie = heightPie; } public String getWidthPie() { return widthPie; } public void setWidthPie(String widthPie) { this.widthPie = widthPie; } public String getPieXml() { return pieXml; } public void setPieXml(String pieXml) { this.pieXml = pieXml; } public String getColumnXml() { return columnXml; } public void setColumnXml(String columnXml) { this.columnXml = columnXml; } public String getChartIdPie() { return chartIdPie; } public void setChartIdPie(String chartIdPie) { this.chartIdPie = chartIdPie; } public String getChartIdColumn() { return chartIdColumn; } public void setChartIdColumn(String chartIdColumn) { this.chartIdColumn = chartIdColumn; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } public String getHeightColumn() { return heightColumn; } public void setHeightColumn(String heightColumn) { this.heightColumn = heightColumn; } public String getWidthColumn() { return widthColumn; } public void setWidthColumn(String widthColumn) { this.widthColumn = widthColumn; } public void constructXML(Map<String, PieColumnChartRecords> map){ PieColumnChartRecords pieColumnChartRecordsForPie = map.get("Pie"); PieColumnChartRecords pieColumnChartRecordsForColumn = map.get("Column"); List<PieColumnChartRecord> pieColumnChartRecordListForPie = null; List<PieColumnChartRecord> pieColumnChartRecordListForColumn = null; if(pieColumnChartRecordsForPie!=null) pieColumnChartRecordListForPie = pieColumnChartRecordsForPie.getPieColumnChartRecord(); if(pieColumnChartRecordsForColumn!=null) pieColumnChartRecordListForColumn = pieColumnChartRecordsForColumn.getPieColumnChartRecord(); String chartNameToDisplay = null; if(pieColumnChartRecordListForPie!=null){ chartNameToDisplay= pieColumnChartRecordListForPie.get(0).getMcName(); pieXml ="<chart caption='"+chartNameToDisplay+"' showPercentValues='1'>"; for(PieColumnChartRecord pie:pieColumnChartRecordListForPie){ String pieLabel = pie.getTradeOrigin().substring(13, pie.getTradeOrigin().length()); String strDataURL = "j-myJS-"+pie.getTradeOrigin(); pieXml +="<set label='"+pieLabel +"' value='"+pie.getTransactions()+ "' link='"+strDataURL+"'/>"; } pieXml +="</chart>"; } System.out.println("<<<< pieXML >>>>>>" +pieXml); if(pieColumnChartRecordListForColumn!=null){ columnXml="<chart caption='"+chartNameToDisplay+"' xAxisName='Channel' yAxisName='Percent of Transactions' numberPrefix='' showValues='0'><categories>"; for(PieColumnChartRecord column:pieColumnChartRecordListForColumn){ String columnLabel = column.getTradeOrigin().substring(13, column.getTradeOrigin().length()); columnXml +="<category label='"+columnLabel+"'/>"; } columnXml +="</categories>"; columnXml +="<dataset seriesName='Name1'>"; for(PieColumnChartRecord column:pieColumnChartRecordListForColumn){ columnXml +="<set value='"+column.getTransactions()+"'/>"; } columnXml +="</dataset>"; } if(pieColumnChartRecordListForPie!=null){ columnXml +="<dataset seriesName='Name2'>"; for(PieColumnChartRecord pie:pieColumnChartRecordListForPie){ columnXml +="<set value='"+pie.getTransactions()+"'/>"; } columnXml +="</dataset>"; } columnXml +="</chart>"; System.out.println("columnXml>>>> " + columnXml); } } PieDetailBean - this is the drill down bean import java.util.List; import com.bfds.web.wsconsumer.ChartWSConsumer; import com.fusioncharts.sampledata.ChartType; public class PieDetailBean { private String heightPieDetail = "300"; private String widthPieDetail = "450"; private String pieDetailXml; private String chartIdPieDetail = "transactionPieDetail"; private String url = null; private String filename = ChartType.COLUMN3D.getFileName(); public String getHeightPieDetail() { return heightPieDetail; } public void setHeightPieDetail(String heightPieDetail) { this.heightPieDetail = heightPieDetail; } public String getWidthPieDetail() { return widthPieDetail; } public void setWidthPieDetail(String widthPieDetail) { this.widthPieDetail = widthPieDetail; } public String getPieDetailXml() { return pieDetailXml; } public void setPieDetailXml(String pieDetailXml) { this.pieDetailXml = pieDetailXml; } public String getChartIdPieDetail() { return chartIdPieDetail; } public void setChartIdPieDetail(String chartIdPieDetail) { this.chartIdPieDetail = chartIdPieDetail; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } public PieDetailBean(String tradeOrigin){ ChartWSConsumer chartWSConsumer = new ChartWSConsumer(); PieColumnChartRecords pieColumnChartRecordsForPie = chartWSConsumer.getPieColumnChartQueryForDrillDownColumn1(tradeOrigin); constructXML(pieColumnChartRecordsForPie); } public String constructXML(PieColumnChartRecords pieColumnChartRecordsForPie){ List<PieColumnChartRecord> pieColumnChartRecordList = null; if(pieColumnChartRecordsForPie !=null){ pieColumnChartRecordList = pieColumnChartRecordsForPie.getPieColumnChartRecord(); } if(pieColumnChartRecordList!=null){ String chartNameToDisplay= pieColumnChartRecordList.get(0).getMcName(); pieDetailXml="<chart caption='"+chartNameToDisplay+"' xAxisName='Transaction Count' yAxisName='Transactions' numberPrefix='' showValues='0'>"; for(PieColumnChartRecord pieDetails1:pieColumnChartRecordList){ if(pieDetails1!=null){ String columnLabel = pieDetails1.getTransactionType().trim(); pieDetailXml +="<set label='"+columnLabel+"' value='"+pieDetails1.getTransactions()+ "'/>"; } } pieDetailXml +="</chart>"; } System.out.println("pie Detail Xml >>>>>>>>>>>>>>>>>>>>>>"+ pieDetailXml); return pieDetailXml; } } jsps:- this is the first jsp <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="title" value="FusionCharts - Array Example using Single Series Column 3D Chart" scope="request"/> <c:set var="header1" value="FusionCharts - Examples" scope="request"/> <c:set var="header2" value=" " scope="request"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <%-- <c:set var="assetCSSPath" value="/ChartHandler-portlet/JSP/assets/ui/css/" scope="request"/> --%> <%-- <c:set var="assetJSPath" value="/ChartHandler-portlet/JSP/assets/ui/js/" scope="request"/> --%> <c:set var="assetImagePath" value="/ChartHandler-portlet/JSP/assets/ui/images/" scope="request"/> <%@page import="com.bfds.web.bean.PieColumnChartBean"%> <%@page import="com.bfds.web.bean.PieDetailBean"%> <% PieColumnChartBean pieColumnChartBean = (PieColumnChartBean)renderRequest.getAttribute("pieColumnChartBean"); %> <SCRIPT LANGUAGE="JavaScript"> function myJS(myVar){ window.alert(myVar); var url = '<portlet:actionURL></portlet:actionURL>'; jQuery.post(url,{tradeOrigin : myVar},function() { }); } </SCRIPT> <tags:template2> <table> <tr> <td> <fc:render chartId="${pieColumnChartBean.chartIdPie}" swfFilename="/ChartHandler-portlet/FusionCharts/Pie2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.pieXml}" /> </td> <td> <fc:render chartId="${pieColumnChartBean.chartIdColumn}" swfFilename="/ChartHandler-portlet/FusionCharts/MSColumn2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.columnXml}" /> </td> </tr> </table> </tags:template2> this is the drill down jsp:- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="title" value="FusionCharts - Array Example using Single Series Column 3D Chart" scope="request"/> <c:set var="header1" value="FusionCharts - Examples" scope="request"/> <c:set var="header2" value=" " scope="request"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <%@page import="com.bfds.web.bean.PieDetailBean"%> <% PieDetailBean pieDetailBean = (PieDetailBean)renderRequest.getAttribute("pieDetailBean"); System.out.println("pieDetailBean xml >>>> in JSP >>>"+ pieDetailBean); if(pieDetailBean!=null) System.out.println("pieDetailBean xml >>>> in JSP >>>"+ pieDetailBean.getPieDetailXml()); %> <tags:template2> <table> <tr> <td> <fc:render chartId="${pieDetailBean.chartIdPieDetail}" swfFilename="/ChartHandler-portlet/FusionCharts/Column2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieDetailBean.pieDetailXml}" /> </td> </tr> </table> </tags:template2>
  15. Hello, Thanks for your response. Error You aren't permitted to upload this kind of file I tried to upload .war file and .rar file...getting the above error..... One more thing, since you are saying you are able to implement fusioncharts drill down feature in liferay portal server, can you pl upload something(like a .war file etc) which can help me resolving my issue. Thanks
  16. Hello, I want to display 2 charts - 1 pie chart and 1 column chart inside one <tr> But it comes one under another. Can someone tell me how to solve this problem, here is my code snippet and also I put the image file of the chart <tr> <td align="left"> <tags:template2> <fc:render chartId="${purRedNetBean.chartIdPie}" swfFilename="/ChartHandler-portlet/FusionCharts/Pie2D.swf" width="450" height="200" debugMode="false" registerWithJS="false" xmlData="${purRedNetBean.pieXml}" /> </tags:template2> </td> <td align="right"> <tags:template2> <fc:render chartId="${purRedNetBean.chartIdColumn}" swfFilename="/ChartHandler-portlet/FusionCharts/Column2D.swf" width="450" height="200" debugMode="false" registerWithJS="false" xmlData="${purRedNetBean.columnPurRedNetXml}" /> </tags:template2> </td> </tr>
  17. I am attaching 2 images, whats happening when I click in a piechart for drill down - it did not display the lower level chart - I get this error- SCRIPT5022: There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. FusionCharts.js, line 15 character 6193 Now, if i enable the debug=true, no clue at all bcoz my data xml is file is perfact. now if I refresh the page I can see the image 2(ref to the attachment). can someone tell me where I am wrong?
  18. Hello Guys, I found the error for this task, its related with js, here are the error details:- SCRIPT5022: There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. FusionCharts.js, line 15 character 6193 SCRIPT5022: There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. FusionCharts.js, line 15 character 6193 ANyidea how can I fix this error.
  19. Hey Guys, Its fixed, actually tamplate tag has to be outside the table tag,just like this <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.fusioncharts.com/jsp/core" prefix="fc" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects/> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <c:set var="folderPath" value="/ChartHandler-portlet/FusionCharts/"/> <c:set var="title" value="FusionCharts - Array Example using Single Series Column 3D Chart" scope="request"/> <c:set var="header1" value="FusionCharts - Examples" scope="request"/> <c:set var="header2" value=" " scope="request"/> <c:set var="jsPath" value="${folderPath}" scope="request"/> <c:set var="assetCSSPath" value="/ChartHandler-portlet/JSP/assets/ui/css/" scope="request"/> <c:set var="assetJSPath" value="/ChartHandler-portlet/JSP/assets/ui/js/" scope="request"/> <c:set var="assetImagePath" value="/ChartHandler-portlet/JSP/assets/ui/images/" scope="request"/> <%@page import="com.bfds.web.bean.PieColumnChartBean"%> <%@page import="com.bfds.web.bean.PieDetailBean"%> <% PieColumnChartBean pieColumnChartBean = (PieColumnChartBean)renderRequest.getAttribute("pieColumnChartBean"); PieDetailBean pieDetailBean = (PieDetailBean)renderRequest.getAttribute("pieDetailBean"); %> <SCRIPT LANGUAGE="JavaScript"> function myJS(myVar){ window.alert(myVar); var url = '<portlet:renderURL></portlet:renderURL>'; jQuery.post(url,{tradeOrigin : myVar},function() { }); } </SCRIPT> <tags:template2> <table> <tr> <td> <fc:render chartId="${pieColumnChartBean.chartIdPie}" swfFilename="/ChartHandler-portlet/FusionCharts/Pie2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.pieXml}" /> </td> <td> <fc:render chartId="${pieColumnChartBean.chartIdColumn}" swfFilename="/ChartHandler-portlet/FusionCharts/MSColumn2D.swf" width="450" height="300" debugMode="false" registerWithJS="false" xmlData="${pieColumnChartBean.columnXml}" /> </td> </tr> </table> </tags:template2> Thanks for your time
  20. Hey Thanks for the reply. Did you guys try in liferay portal server, mine is a liferay portal and I tried the way you are saying in the very first time, it did not come. Thanks
  21. This attached image is what I am looking for, and how can I achieve my target