I develop an application using Smartgwt. Just one thing that is missing in it - chart. I decided to write my own implementation of Open Flash Chart(http://ofc2dz.com/) for smartgwt using flashlet and then put it somewhere(e.g. googlecode). But first of all I want to ask: Is there any ready implementations? Why is Smartgwt have no its own implementation of any chart?(licence, any other points of view)
Announcement
Collapse
No announcement yet.
X
-
I've packed initial version of OFC chart for Smartgwt. It is based on ofcgwt 2.0.1 beta, but uses Smartgwt's Flashlet. All you need to use it - is, import jar in classpath and use like it ofcgwt.Code:<inherits name="com.smartgwt.ofcchart.OFCChart4SGWT"/>
For todo: I want to implement work with Datasource
Here the jar file http://dl.dropbox.com/u/690921/OFCChart4SGWT-1.0.jar
Comment
-
Have you seen this? http://www.smartclient.com/#gridChartingOriginally posted by Metallic[...] Is there any ready implementations? Why is Smartgwt have no its own implementation of any chart?(licence, any other points of view)
This is part of SmartClient, only a java wrapper is missing, and then it can be incorporated into SmartGWT. (Would be nice.)
Comment
-
Do you mean a wrapper that can be conveniently used in SmartGWT, or is it really a new implementation (ie. a complete rewrite from stracth)?Originally posted by MetallicI decided to write my own implementation of Open Flash Chart(http://ofc2dz.com/) for smartgwt
Comment
-
I don't think it's a good idea to put your independent code in SmartGWT's NameSpace (com.smartgwt); that's contrary to the universally accepted Naming Convention of java.Originally posted by MetallicI've packed initial version of OFC chart for Smartgwt. It is based on ofcgwt 2.0.1 beta, but uses Smartgwt's Flashlet. All you need to use it - is, import jar in classpath and use like it ofcgwt.Code:<inherits name="com.smartgwt.ofcchart.OFCChart4SGWT"/>
(See http://java.sun.com/docs/codeconv/ht....doc8.html#367)
You should place your own packages in your own namespace.
Comment
-
I've got a problem in using OFC for Smartgwt.
I've downloaded jar file, provided by Metallic and added it to my project.
Then added an "inherits" record in my .gwt.xml file.
Code:<?xml version="1.0" encoding="UTF-8"?> <module rename-to='webarm'> <inherits name='com.google.gwt.user.User'/> <inherits name='com.smartgwt.SmartGwt'/> <inherits name="com.smartgwt.SmartGwtPluginBridges"/> <inherits name="com.smartgwt.ofcchart.OFCChart4SGWT"/> <inherits name='com.google.gwt.user.theme.standard.Standard'/> <extend-property name="locale" values="ru_RU"/> <entry-point class='com.tenzor.webarm.client.WebARM'/> <source path='client'/> </module>
Here's the code I've written in "onModuleLoad" method:
So, after all this operations, when I run the server and navigate to it with my browser, I receive errors:Code:LineChart lc = new LineChart(); lc.addValues(1, 2, 4, 8, 16, 32); lc.addDots(new Dot(1),new Dot(2),new Dot(4),new Dot(8),new Dot(16),new Dot(32)); ChartData cd = new ChartData(); cd.addElements(lc); ChartWidget cw = new ChartWidget(); cw.setWidth100(); cw.setHeight100(); cw.setChartData(cd); Window w = new Window(); w.addChild(cw); w.setCanDragResize(true); w.setCanDrop(true); w.show(); HLayout dock = new HLayout(); dock.setCanAcceptDrop(true); RootPanel.get().add(dock);
So, what can cause that errors?Code:No source code is available for type com.smartgwt.ofcchart.client.model.elements.LineChart; did you forget to inherit a required module? No source code is available for type com.smartgwt.ofcchart.client.model.elements.dot.Dot; did you forget to inherit a required module? No source code is available for type com.smartgwt.ofcchart.client.model.ChartData; did you forget to inherit a required module? No source code is available for type com.smartgwt.ofcchart.client.ChartWidget; did you forget to inherit a required module?
I'm using GWT 2.0.3, SmartGWT 2.2, Firefox 3.5.7
P.S. Sorry for my bad english :)
Comment
-
I've improved my project http://dl.dropbox.com/u/690921/OFCChart4SGWT-1.0.jar If it help somebody - I will create project on googlecode
PS Now you should inherit <inherits name="ua.metallic.ofcchart.OFCChart4SGWT"/>
Comment
-
I've posted initial version to http://code.google.com/p/ofc4sgwt/, later I'll try to investigate and implement DataSource compatibility. Any help is appreciated.Originally posted by sjivanI think it would be very useful to add this to google code. Other enhancements worth exploring are making the Chart's directly support databinding with DataSource's. That would be quite powerful.
Sanjiv
Comment
-
I temporary froze my work on this project, next week I plan to implement "Save image locally" feature, add DataSource compatibility and patch chart to remove tooltip(if it not hovers the point)Originally posted by tredholznice!
what do i have to do to get the "Save Image Locally" option to work?
or can you include it into your project?
edit: tooltips do not disappear, when i move the mouse over to another area in my application than the chart!?
Comment
Comment