-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi !
I'm trying to do a simple flash line chart like the following given examples:
http://www.zkoss.org/zkdemo/chart/other_flash_charts
http://books.zkoss.org/wiki/Small_Talks/2009/August/Open_Flash_Charts_with_ZK
This is my sample code:
<zk> <vbox> <flashchart id="chart" width="570" height="300"></flashchart> <zscript> SimpleCategoryModel model = new SimpleCategoryModel(); model.setValue("Serie 1", "January", new Double(1)); model.setValue("Serie 1", "Febrery", new Double(2)); model.setValue("Serie 1", "March", new Double(3)); model.setValue("Serie 1", "April", new Double(4)); model.setValue("Serie 1", "May", new Double(5)); model.setValue("Serie 1", "June", new Double(6)); model.setValue("Serie 2", "January", new Double(6)); model.setValue("Serie 2", "Febrery", new Double(5)); model.setValue("Serie 2", "March", new Double(4)); model.setValue("Serie 2", "April", new Double(3)); model.setValue("Serie 2", "May", new Double(2)); model.setValue("Serie 2", "June", new Double(1)); model.setValue("Serie 3", "January", new Double(2)); model.setValue("Serie 3", "Febrery", new Double(3)); model.setValue("Serie 3", "March", new Double(4)); model.setValue("Serie 3", "April", new Double(5)); model.setValue("Serie 3", "May", new Double(6)); model.setValue("Serie 3", "June", new Double(7)); chart.setModel(model); chart.setType("line"); </zscript> </vbox> </zk>
You can see that there are three series to group the data (serie1, serie2 and serie3), but when I run the sample I only see ONE BLUE LINE, I see in the DEMO when you group the data the chart will show the lines with different color and each "serie" or "group" will appear like an explanation legend with color circles next to the graphic. In my example it doesn't happen.
I'm using zk-bin-5.0.9.
What am I doing wrong? :(
Thanks for any help.
Regards.
carpolva,
I submit to you that this is probably a bug. I can duplicate your troubles in 5.0.7 but then it works fine in 5.0.11 and 6.0.
The good news is that it isn't your code!
Maybe the best idea is to upgrade your version if you can. One other suggestion might be to try upgrading just the flash chart jar file and see what happens.
Regards,
Todd
Hi twiegand.
I tried with zk-bin-6.0.0 and it works!... so, as you said it might be a bug in the version zk-bin-5.0.9.
I have an entire web project developed with zk-bin-5.0.9, if I upgrade it to version 6.0 is there the possibility of compatibility problems? :s
By the way... could you tell me which is the jar file that includes the flash chart functionalities?... first I'll try upgrading only this jar file.
Thanks.
Asked: 2012-04-12 17:16:37 +0800
Seen: 230 times
Last updated: Apr 13 '12