[jboss-cvs] jboss-seam/examples/itext/view ...
Norman Richards
norman.richards at jboss.com
Thu Jun 28 18:27:59 EDT 2007
User: nrichards
Date: 07/06/28 18:27:59
Modified: examples/itext/view chartimage.xhtml
Log:
use a form to change chart values
Revision Changes Path
1.3 +39 -26 jboss-seam/examples/itext/view/chartimage.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: chartimage.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/itext/view/chartimage.xhtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- chartimage.xhtml 12 May 2007 00:02:46 -0000 1.2
+++ chartimage.xhtml 28 Jun 2007 22:27:59 -0000 1.3
@@ -2,7 +2,8 @@
xmlns:p="http://jboss.com/products/seam/pdf"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:f="http://java.sun.com/jsf/core">
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
<head>
<title>Seam PDF</title>
</head>
@@ -14,31 +15,43 @@
<p:color id="bar" color="#ff00ff" color2="#00ff00" point="50 50" point2="300 300"/>
- <h1>This is an HTML page</h1>
+ <h1>Dynamic Chart</h1>
+
+ <h:form>
+ <s:validateAll>
+ Title: <h:inputText value="#{chart.title}" /> <br />
+ Height: <h:inputText value="#{chart.height}" />
+ Width: <h:inputText value="#{chart.width}" /> <br />
+ Category Label: <h:inputText value="#{chart.categoryAxisLabel}" />
+ Value Label: <h:inputText value="#{chart.valueAxisLabel}" /> <br />
+
+
+ 3D: <h:selectBooleanCheckbox value="#{chart.is3d}" />
+ Legend: <h:selectBooleanCheckbox value="#{chart.legend}" /> <br />
+ </s:validateAll>
+
+ <h:commandButton value="change" action="/dynchart.xhtml" />
+ </h:form>
+
+ <p:barchart title="#{chart.title}" orientation="vertical"
+ is3D="#{chart.is3d}" legend="#{chart.legend}"
+ width="#{chart.width}" height="#{chart.height}"
+ categoryAxisLabel="#{chart.categoryAxisLabel}"
+ valueAxisLabel="#{chart.valueAxisLabel}">
+ <p:series key="data1" seriesPaint="blue" seriesStroke="dot2"
+ seriesFillPaint="red" seriesVisibleInLegend="true"
+ seriesOutlinePaint="pink" seriesOutlineStroke="dot1">
- <p:piechart title="Pie Chart" width="200" height="200" legend="true">
<ui:repeat value="#{data.pieData}" var="item">
- <p:data key="#{item.name}" value="#{item.value}" />
+ <p:data columnKey="#{item.name}" value="#{item.value}" />
</ui:repeat>
- <p:data key="foo" value="20" explodedPercent=".2" />
- <p:data key="bar" value="20" explodedPercent=".3" />
- <p:data key="baz" value="20" />
- </p:piechart>
-
- <p:piechart title="Pie Chart" width="200" height="200" legend="true"
- borderBackgroundPaint="#ffffff" borderStroke="dot1" borderPaint="blue" borderVisible="false"
- plotBackgroundPaint="#ffffff" plotBackgroundAlpha="1" plotForegroundAlpha="1"
- plotOutlinePaint="blue" plotOutlineStroke="dot1"
- labelBackgroundPaint="gray" labelPaint="white" labelLinkStroke="dot2"
- direction="anticlockwise" >
+ </p:series>
+ <p:series key="data2" seriesPaint="green" seriesStroke="dot2">
<ui:repeat value="#{data.pieData}" var="item">
- <p:data key="#{item.name}" value="#{item.value}"
- sectionPaint="#777777" sectionOutlineStroke="dot2" />
+ <p:data columnKey="#{item.name}" value="#{item.value+10}" />
</ui:repeat>
- <p:data key="foo" value="20" explodedPercent=".2" sectionPaint="#111111" />
- <p:data key="bar" value="20" explodedPercent=".3" sectionPaint="#333333" />
- <p:data key="baz" value="20" sectionPaint="#555555" sectionOutlineStroke="dot2" />
- </p:piechart>
+ </p:series>
+ </p:barchart>
</body>
</html>
More information about the jboss-cvs-commits
mailing list