Flashchart"

From Documentation
Line 14: Line 14:
 
[[Image:ZKComRef_Flashchart_Examples.PNG]]  
 
[[Image:ZKComRef_Flashchart_Examples.PNG]]  
  
 
+
<source lang="xml">
<source lang="xml" >
+
<flashchart id="mychart" width="500" height="250" type="pie">
<vbox>
+
<zscript><![CDATA[
<grid width="400px">
+
PieModel model = new SimplePieModel();
<columns>
+
model.setValue("C/C++", new Double(56));
<column label="category" width="150px" />
+
model.setValue("VB", new Double(51));
<column label="value" />
+
model.setValue("Java", new Double(202));
</columns>
+
model.setValue("PHP", new Double(141));
<rows>
+
mychart.setModel(model);
<row>
+
]]></zscript>
<label id="c0" value="C/C++" />
+
</flashchart>
<decimalbox id="v0" value="21.2" constraint="no empty"
 
onChange="update(0)" />
 
</row>
 
<row>
 
<label id="c1" value="VB" />
 
<decimalbox id="v1" value="10.2" constraint="no empty"
 
onChange="update(1)" />
 
</row>
 
<row>
 
<label id="c2" value="Java" />
 
<decimalbox id="v2" value="40.4" constraint="no empty"
 
onChange="update(2)" />
 
</row>
 
<row>
 
<label id="c3" value="PHP" />
 
<decimalbox id="v3" value="28.2" constraint="no empty"
 
onChange="update(3)" />
 
</row>
 
</rows>
 
</grid>
 
<flashchart id="mychart" width="500" height="250"
 
type="pie">
 
<zscript>
 
void update(int rowIndex) {
 
Label lb = (Label) self.getFellow("c"+rowIndex);
 
Decimalbox db = (Decimalbox) self.getFellow("v"+rowIndex);
 
model.setValue(lb.value, new Double(db.getValue().doubleValue()));
 
  } 
 
  PieModel model = new SimplePieModel();
 
for(int j=0; j &lt; 4; ++j) {
 
update(j);
 
  }
 
  mychart.setModel(model);
 
</zscript>
 
</flashchart>
 
<toolbarbutton label="See More chart..." href="/userguide/data/moreflashchart.zul" target="zkdemo"/>
 
</vbox>
 
 
 
</source>
 
</source>
  

Revision as of 06:06, 23 November 2010

Flashchart

Employment/Purpose

The generic flash chart component.

Example

ZKComRef Flashchart Examples.PNG

<flashchart id="mychart" width="500" height="250" type="pie">
	<zscript><![CDATA[
		PieModel model = new SimplePieModel();
		model.setValue("C/C++", new Double(56));
		model.setValue("VB", new Double(51));
		model.setValue("Java", new Double(202));
		model.setValue("PHP", new Double(141));
		mychart.setModel(model);
	]]></zscript>
</flashchart>

Supported Events

Name
Event Type
None None
  • Inherited Supported Events: Flash

Supported Children

*ALL

Use Cases

Version Description Example Location
     

Version History

Last Update : 2010/11/23


Version Date Content
     



Last Update : 2010/11/23

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.