Chart"
From Documentation
Line 13: | Line 13: | ||
= Example = | = Example = | ||
+ | [[Image:ZKComRef_Chart.png]] | ||
+ | {| border="1" | ||
+ | ! <center>Type</center> | ||
+ | ! <center>Model</center> | ||
+ | ! <center>3D</center> | ||
+ | |- | ||
+ | | <center><tt>pie</tt></center> | ||
+ | | <tt>PieModel</tt> | ||
+ | | <center><tt>o</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>ring</tt></center> | ||
+ | | <tt>PieModel</tt> | ||
+ | | <center><tt>x</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>bar</tt></center> | ||
+ | | <tt>CategoryModel</tt> | ||
+ | | <center><tt>o</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>line</tt></center> | ||
+ | | <tt>CategoryModel </tt>or<tt> XYModel</tt> | ||
+ | | <center><tt>o</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>area</tt></center> | ||
+ | | <tt>CategoryModel </tt>or<tt> XYModel</tt> | ||
+ | | <center><tt>x</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>stacked_bar </tt></center> | ||
+ | | <tt>CategoryModel</tt> | ||
+ | | <center><tt>o</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>stacked_area </tt></center> | ||
+ | | <tt>CategoryModel </tt>or<tt> XYModel</tt> | ||
+ | | <center><tt>x</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>waterfall </tt></center> | ||
+ | | <tt>CategoryModel</tt> | ||
+ | | <center><tt>x</tt></center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>polar </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>scatter </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>time_series </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>polar </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>step_area </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>step </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>histogram </tt></center> | ||
+ | | <tt>XYModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>candlestick </tt></center> | ||
+ | | <tt>HiLoModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |- | ||
+ | | <center><tt>hilow </tt></center> | ||
+ | | <tt>HiLoModel</tt> | ||
+ | | <center>x</center> | ||
+ | |||
+ | |} | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <vbox> | ||
+ | <chart id="mychart" title="Pie Chart Demo" width="500" height="250" type="pie" threeD="true" fgAlpha="128"/> | ||
+ | <zscript> | ||
+ | PieModel model = new MyPieModel(); | ||
+ | mychart.setModel(model); | ||
+ | </zscript> | ||
+ | </vbox> | ||
+ | </source> | ||
=Supported events= | =Supported events= |
Revision as of 03:38, 18 May 2010
Chart
Employment/Purpose
A chart is used to show a set of data as a graph. It helps users to judge things with a snapshot. To use a chart component , developers must prepare a ChartModel and a ChartEngine. Developers also set proper chart type, and the threeD (3D) attribute to draw proper chart. The model and type must match to each other; or the result is unpredictable. The 3D chart is not supported on all chart type.
Example
PieModel | ||
PieModel | ||
CategoryModel | ||
CategoryModel or XYModel | ||
CategoryModel or XYModel | ||
CategoryModel | ||
CategoryModel or XYModel | ||
CategoryModel | ||
XYModel | ||
XYModel | ||
XYModel | ||
XYModel | ||
XYModel | ||
XYModel | ||
XYModel | ||
HiLoModel | ||
HiLoModel |
<vbox>
<chart id="mychart" title="Pie Chart Demo" width="500" height="250" type="pie" threeD="true" fgAlpha="128"/>
<zscript>
PieModel model = new MyPieModel();
mychart.setModel(model);
</zscript>
</vbox>
Supported events
None | None |
Supported Children
*ALL
Use cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
5.0.2 | 5/19/2010 | Initialization |