-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello.
I am writing an Open Flash Chart component integration with ZK (that i want to share with the community). I wrote the view, the handle and so on.
The renderer generate some html code that need access to some javascript files that are in the jar component.
My problem is that the js are not found. I putted in /web/js on the jar. And in the code are referenced with:
<SCRIPT src="/js/json2.js" type="text/javascript"> </SCRIPT>
Thank's
/fselva
Hi,
I had start the the exact same job a few days ago. Have you gone how much far?
I've developed a simple wrapper to ofc2, so it can use in zul page like <ofcz id="mychart" width="..." heigth="..." />, is pretty basic, doesn't support a file to load data (the data is loaded dynamically in a java class like mychart.setChartData(String jsonChartData).
It has a few bugs, but in my tests its already usable.
You're willing to implement the ofc chart api? I'm using the jofc2 library for the moment, but not very happy with it.
We could joint efforts on this one.
And for your question, in my impl, I don't use script, I use embed and load the swf (basic copied from Flash component from zk core)
Regards,
Madruga
Charting is a thing that is missing in my zk sample application.
If i can help , please let me know.
regards
Stephan
PS: Is this compatible with JFreeChart ?
Madruga:
I have the aproach like yours (chart.setData(jsondata)). When i get this running i'll implement the jfc api. I am using the jfc2 too. I like the results you can get.
How do you embeded the flash swf file? You don't need the json2.js, swfobject.js, etc?
I use all my stuff in a java way. How you implemented the zul tags?
Thanks
Stephan:
What about your sample application? We can make some sample charts you can put in it.
My idea is to make the use of the component, very similar to the use of JFreeChart in zk. So you can select, for example, a bar chart implemented as JFreeChart or as Open Flash Chart, using the model and properties assigned.
Thanks
Fernando
@fselva,
yes, that's no problem to put charts in it. We must only think about it what data are shown.
Stephan
https://62.75.171.30/test/
admin/admin
@Stephan compatibility with JFreeChart wil be limited by ofc because JFreeChart has much more chart types (like gant, wind, candle, etc). OFC currently has only line, bar, pie and radar. The interesting of OFC is that is in flash, so it's more interactive and more beautiful (in my opinion).
@Fernando I embed only the swf from ofc and for now I have one zul tag only (<ofcz ... />), but I've done some testing today and it's a little buggy, sometimes works, sometimes not, missing something related with JS probably.
I've made the source available via bitbucket here
So you can take a look at my implementation.
But it would be really nice if you (and you too Stephan) created a account at bitbucket so we could join efforts on this component.
Regards,
Madruga
add my wlm/gtalk if u want, omadruga at gmail
Hi all,
I've fixed all the bugs, and released a RC version of ofcz zk plugin for Open Flash Chart.
Download here.
Simple wiki here.
@Stephan: Congratulations for your demo app, it's quite beautiful. I was thinking about creating some examples of usage ofcz + jofc2 to put on the wiki, but would be nice if we could generate the example with some "real" word data from your demo app, and also put the charts on your app, what do you think about?
Regards,
Madruga
Madruga
@madruga
@fselva
Yes, that would be nice.
1. All data in the sample app can be created from a script. So it's no problem if something crashed.
2. Over the basic 27 customers. We have a test-data routine that created 10.000 customers at a run.
At time there are about 120.000 records.
3. Think about of a chart which shows a diagram of the customers percentage 'city' or 'branch' because they are randomned created.
7. Next days, i'll update to 3.6.2
regards
Stephan
PS: Please contact me under sge(at)forsthaus(dot)de
I've relased version 0.2 of OFCZ which fixes a major bug.
also there is a new line chart example using jofc2 API - view it here
best regards,
Madruga
Asked: 2009-05-29 04:17:40 +0800
Seen: 1,393 times
Last updated: Jun 29 '09