0

Problem with Flash Chart

asked 2012-04-12 17:16:37 +0800

carpolva gravatar image carpolva
155 4

updated 2012-04-12 18:50:47 +0800

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.

delete flag offensive retag edit

4 Replies

Sort by » oldest newest

answered 2012-04-12 19:24:30 +0800

twiegand gravatar image twiegand
1807 3

updated 2012-04-12 19:25:30 +0800

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

link publish delete flag offensive edit

answered 2012-04-12 19:43:40 +0800

carpolva gravatar image carpolva
155 4

updated 2012-04-12 21:02:18 +0800

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.

link publish delete flag offensive edit

answered 2012-04-12 21:51:03 +0800

twiegand gravatar image twiegand
1807 3

carpolva,

Since flashchart seems to be in the zul.jar, I think I'd try upgrading to 5.0.11 first and see how that works for you.

Todd

link publish delete flag offensive edit

answered 2012-04-13 14:32:56 +0800

carpolva gravatar image carpolva
155 4

Hi twiegand.

I upgraded to 5.0.11 and it works ok.... I'll continue working with that version (maybe for another project I'll use 6.0).

Thank you very much.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-04-12 17:16:37 +0800

Seen: 230 times

Last updated: Apr 13 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More