Thanks Nitesh. Indeed, I switched to OFCGWT as well. It works well and looks pretty good. (I miss the GWT-Ext ColumnChart animation, though.)
On May 5, 10:28 am, Nitesh Dasari <[email protected]> wrote: > Hi Kevin, > > Finally i am able succed with this using the ofcgwt api. > > My code is below: > > <?xml version=*"1.0"* encoding=*"UTF-8"* standalone=*"no"*?><module> > > <!-- Inherit the core Web Toolkit stuff. --> > > <inherits name=*"com.google.gwt.user.User"*/> > > <inherits name=*"com.gwtext.GwtExt"*/> > > <inherits name=*"com.rednels.ofcgwt.OFCGWT"*/> > > <!-- Specify the *app* entry point class. --> > > <entry-point class=*"com.bolt.client.BoltApplication"*/> > > <source path=*"client"*/> > > <source path=*"data"*/> > > <source path=*"response"*/> > > <inherits name=*"com.google.gwt.user.theme.standard.Standard"*/> > > <stylesheet src=*"js/ext-2.0.2/resources/css/ext-all.css"*/> > > <script src=*"js/ext-2.0.2/adapter/ext/ext-base.js"*/> > > <script src=*"js/ext-2.0.2/ext-all.js"*/> > > <servlet class=*"com.bolt.server.BoltServiceImpl"* path=*"/BoltService"*/> > > </module> > > and actual code is : > * > > private* DecoratorPanel orderRateLineChart() > > { > > DecoratorPanel orderRateDecPanel =*new* DecoratorPanel(); > > ChartWidget chart = *new* ChartWidget(); > > ChartData cd = *new* ChartData("Order Rate/Sec Distribution","font-size: > 14px; font-family: Verdana; text-align: center;"); > > cd.setBackgroundColour("#ffffff"); > > ScatterChart scat = *new* ScatterChart(ScatterStyle.*LINE*); > > scat.setDotSize(2); > > scat.addPoints(*new* ScatterChart.Point(20,1)); > > scat.addPoints(*new* ScatterChart.Point(80,2)); > > scat.addPoints(*new* ScatterChart.Point(100,3)); > > scat.addPoints(*new* ScatterChart.Point(150,4)); > > scat.addPoints(*new* ScatterChart.Point(190,5)); > > scat.addPoints(*new* ScatterChart.Point(50,6)); > > scat.addPoints(*new* ScatterChart.Point(290,7)); > > scat.addPoints(*new* ScatterChart.Point(130,8)); > > XAxis xa = *new* XAxis(); > > xa.setRange(10, 300, 40); > > cd.setXAxis(xa); > > cd.setXLegend(*new* Text("Order Rate","font-size: 15px; font-style: > normal;font-weight: bold; font-family: Verdana, Arial, Helvetica, > sans-seriff; color: #000000;")); > > YAxis ya = *new* YAxis(); > > ya.setRange(0, 8, 2); > > cd.setYAxis(ya); > > cd.setYLegend(*new* Text("Time in Seconds","font-size: 15px; font-style: > normal;font-weight: bold; font-family: Verdana, Arial, Helvetica, > sans-seriff; color: #000000;")); > > cd.addElements(scat); > > chart.setSize("475", "300"); > > chart.setJsonData(cd.toString()); > > orderRateDecPanel.add(chart); > > *return* orderRateDecPanel; > > } > > * > > public* *void* onModuleLoad() > > { > > *try > * > > { > > System.*out*.println("Bolt Application Starting in OnModule"); > > FlexTable searchCriteriaLayout = *new* FlexTable(); > > searchCriteriaLayout.setCellSpacing(15); > > FlexCellFormatter cellFormatter = > searchCriteriaLayout.getFlexCellFormatter(); > > // Add a title to the form > > searchCriteriaLayout.setHTML(0, 0, "BOLT Application"); > > cellFormatter.setColSpan(0, 0, 2); > > cellFormatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.* > ALIGN_CENTER*); > > searchCriteriaLayout.setWidget(1,0,displaySearchCriteriaPanel()); > > cellFormatter.setColSpan(1, 0, 2); > > cellFormatter.setHorizontalAlignment(1, 0, HasHorizontalAlignment.* > ALIGN_CENTER*); > > FlexTable firstRowLayout = *new* FlexTable(); > > firstRowLayout.setCellSpacing(15); > > FlexCellFormatter firstRowCellFormatter = > firstRowLayout.getFlexCellFormatter(); > > boltService=getService(); > > top5BuyGrid=constructTop5BuyOrdersGrid(); > > getTop5BuyOrdersData(); > > //boltService.getTop5BuyOrders(*req*, top5BuyOrdersCallback); > > firstRowLayout.setWidget(2, 0,top5BuyGrid ); > > firstRowCellFormatter.setColSpan(0, 0, 2); > > firstRowCellFormatter.setHorizontalAlignment(0, 0,HasHorizontalAlignment.* > ALIGN_CENTER*); > > stocksStatisticsDtlsGrid=constructstocksStatisticsDtlsGrid(); > > getStockStatisticsData(); > > //boltService.getStockStatistics(*req*, stocksStatisticsDtlsCallback); > > firstRowLayout.setWidget(2, 1, stocksStatisticsDtlsGrid ); > > FlexTable secondRowLayout = *new* FlexTable(); > > secondRowLayout.setCellSpacing(15); > > top5SellGrid=constructTop5SellOrdersGrid(); > > getTop5SellOrdersData(); > > //boltService.getTop5SellOrders(*req*, top5SellOrdersCallback); > > secondRowLayout.setWidget(0, 0, top5SellGrid); > > secondRowLayout.setWidget(0, 1,orderRateLineChart()); > > secondRowLayout.setWidget(0, 2,stockSummaryReport()); > > getDataButton.addListener( *new* ButtonListenerAdapter() > > { > > *public* *void* onClick( Button button, EventObject e ) > > { > > DateTimeFormat sdf = DateTimeFormat.*getFormat*("yyyy-MM-dd HH:mm:ss"); > > Date stockDtlsDateTime=*new* Date(); > > *if*(stockDtlsDate.getValue() != *null*) > > { > > *stockDtlsDateTime.setYear(stockDtlsDate.getValue().getYear())*; > > *stockDtlsDateTime.setMonth(stockDtlsDate.getValue().getMonth())*; > > *stockDtlsDateTime.setDate(stockDtlsDate.getValue().getDate())*; > > } > > *if*(stockDtlsTime.getValue() != *null*) > > { > > String strstockDtlsTime=stockDtlsTime.getValue(); > > System.*out*.println("Time selected:"+strstockDtlsTime); > > String stockDtlsTM[]=strstockDtlsTime.split(":"); > > *stockDtlsDateTime.setHours(Integer.parseInt(stockDtlsTM[0]))*; > > *stockDtlsDateTime.setMinutes(Integer.parseInt(stockDtlsTM[1]))*; > > *stockDtlsDateTime.setSeconds(0)*; > > } > > String strDateTimeFromUI=*null*; > > strDateTimeFromUI=sdf.format(stockDtlsDateTime); > > System.*out*.println("Date/Time Selected from GUI:" +strDateTimeFromUI); > > *if*(stockDtlsDate.getValue() != *null* && stockDtlsTime.getValue() != *null > *) > > { > > boltService.getTop5BuyOrders(strDateTimeFromUI, *top5BuyOrdersCallback*); > > boltService.getTop5SellOrders(strDateTimeFromUI, *top5SellOrdersCallback*); > > boltService.getStockStatistics(strDateTimeFromUI, * > stocksStatisticsDtlsCallback*); > > } > > *else > * > > { > > MessageBox.*alert*( "Input Error", "Please select the Display Stock Details > Date/Time "); > > } > > stockDtlsDateTime=*null*; > > } > }); > > HorizontalPanel searchCriteriaHPanel=*new* HorizontalPanel(); > > searchCriteriaHPanel.add(searchCriteriaLayout); > > searchCriteriaHPanel.setCellHorizontalAlignment(searchCriteriaLayout,HasHor > izontalAlignment. > *ALIGN_CENTER*); > > HorizontalPanel row2HPanel=*new* HorizontalPanel(); > > row2HPanel.add(firstRowLayout); > > HorizontalPanel row3HPanel=*new* HorizontalPanel(); > > row3HPanel.add(secondRowLayout); > > VerticalPanel headerVPanel=*new* VerticalPanel(); > > headerVPanel.add(searchCriteriaHPanel); > > VerticalPanel bodyVPanel=*new* VerticalPanel(); > > bodyVPanel.add(firstRowLayout); > > bodyVPanel.add(secondRowLayout); > > DecoratorPanel bodyDecPanel = *new* DecoratorPanel(); > > bodyDecPanel.setWidget(bodyVPanel); > > VerticalPanel mainPanel=*new* VerticalPanel(); > > mainPanel.setStyleName("transcript"); > > mainPanel.add(headerVPanel); > > mainPanel.setHorizontalAlignment(HasHorizontalAlignment.*ALIGN_CENTER*); > > mainPanel.add(bodyDecPanel); > > //Wrap the content in a DecoratorPanel > > DecoratorPanel decPanel = *new* DecoratorPanel(); > > decPanel.setWidget(mainPanel); > > RootPanel.*get*().add(decPanel); > > } > > *catch*(Exception e) > > { > > e.printStackTrace(); > > System.*out*.println("error at Client"+e); > > } > } > > Thanks&Regards > > Nitesh > > On Sat, May 2, 2009 at 4:40 AM, Kevin Wong <[email protected]>wrote: > > > > > What's with this Viewport dependency? I just want to create a chart > > and add it to my page. Shouldn't that just work? Do I have go have > > GWT-Ext containers starting with Viewport all they way down the view > > hierarchy to my chart? Cause I'm not going to change all my apps view > > containers to be GWT-Ext ones just to add a chart. > > > I'm starting to think that I should move away from GWT-Ext, as if > > something as important as charts not working in IE isn't being > > addressed, perhaps the project is no longer being maintained... > > > On Mar 17, 8:29 am, "[email protected]" > > <[email protected]> wrote: > > > Hi, > > > > Does any one succeed with chartadding to Rootpanel: RootPanel.get > > > ().add(chart); > > > > All my other compnents are added to Rootpanel. I need to add > > thischartalso to the Root panel. > > > > As per below suggestion i used ofcgwt api, > > > > but in the examples of ofcgwt allchartwidgets are added to > > > com.google.gwt.user.client.ui.SimplePanel; > > > > But i need to add mychartto com.gwtext.client.widgets.Panel; > > > > how can i assign simplePanel component to panel component. > > > > Thanks in advance > > > > Thanks&Regards > > > Nitesh > > > > On Feb 7, 10:56 am, anita sharma <[email protected]> wrote: > > > > > Hello All, > > > > > ofcgwt.jar > > > > 352KViewDownload > > > > > You should use ofcgwt, It will work fine on IE, Mozilla and other > > browsers.I > > > > also found same problem in gwt, so this is the better solution for you. > > > > > On my side it is working fine, Please finds the attached jar. > > > > > Thanks > > > > > Anil Garg > > > > > On Tue, Feb 3, 2009 at 5:38 AM, ytbryan <[email protected]> wrote: > > > > > > I am also finding a solution for this problem.if someone found a > > > > > solution please email me at ytbryan at gmail please. > > > > > > i appreciate it. thank you! > > > > > > bryan > > > > > > On Jan 5, 2:59 pm, Syed Shahul <[email protected]> wrote: > > > > > > Buddy, > > > > > > > i am also try for that, if you found any solutions let me know, > > > > > > > thanking you in anticipation > > > > > > Regards, > > > > > > Syed > > > > > > > On Dec 29 2008, 1:31 pm, SunilBansal <[email protected]> > > > > > > wrote: > > > > > > > > Hi Syed, > > > > > > > > I konw, It's working fine if i useViewPort. But i want to render > > > > > > > GWTExt charts on RootPanel. > > > > > > > > On Dec 26, 9:56 am, Syed Shahul <[email protected]> > > wrote: > > > > > > > > > Hi Sunil, > > > > > > > > > insted of RootPanel useViewPort > > > > > > > > > panel.add(chart); > > > > > > > >Viewportviewport= newViewport(panel); > > > > > > > > > On Dec 23, 12:56 pm, SunilBansal <[email protected]> > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" 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/gwt-ext?hl=en -~----------~----~----~----~------~----~------~--~---
