0

displaying data in chart

asked 2009-05-28 12:04:46 +0800

soumaya gravatar image soumaya
99 1

Hi,

I am having trouble to display ALL data into a chart.

Here is the code that I am using in the zul file
<chart id="timeseries" title="mytitle" width="600" height="500" type="time_series" threeD="false" fgAlpha="128" />
<zscript>XYModel xymodel = new SimpleXYModel();
timeseries.setModel(xymodel);
</zscript>

Here is the java code that I am using to draw a chart:
Chart timeseries = (Chart) getFellow("ctWnd").getFellow("timeseries");
xymodel.addValue("mytitle", getData().getTime(),getpos());

But the chart doesn't diplsay ALL THE getTime() data

Could you please tell me how to fix it.
Thanks

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-06-01 01:35:52 +0800

PeterKuo gravatar image PeterKuo
481 2

updated 2009-06-01 01:36:48 +0800

I can't see any problem from your provided sample code.
Can you provide reduced but reproducible code?

http://docs.zkoss.org/wiki/Chart_and_Report
http://docs.zkoss.org/wiki/ZK_Charts

You may try to add data to model first, and then call setModel().
But according to the doc, it should not affect the result.
Maybe it's a bug of live data. You may update to latest ZK version and try again.

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: 2009-05-28 12:04:46 +0800

Seen: 243 times

Last updated: Jun 01 '09

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