Adding the capacity to create charts in OFBiz. Examples are based on the example component, and examples must be created to show charts.

Charts are using the flotr library (http://code.google.com/p/flotr/) which is under a MIT license and is based on the Prototype Javascript Framework.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@945044 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erwan de Ferrieres
2010-05-17 09:29:38 +00:00
parent ed6dda1757
commit a877c6fc4b
18 changed files with 6788 additions and 3 deletions
@@ -312,4 +312,63 @@ under the License.
</section>
</screen>
<screen name="ChartDataList">
<section>
<widgets>
<include-form name="ChartDataList" location="component://example/widget/example/ExampleForms.xml" />
</widgets>
</section>
</screen>
<screen name="PieChart">
<section>
<actions>
<set field="headerItem" value="Piecharts"/>
<entity-condition entity-name="ExampleCountByType" list="chartData">
<order-by field-name="exampleTypeId"/>
</entity-condition>
<set field="chartType" value="Pie"/>
<set field="labelFieldName" value="exampleTypeId"/>
<set field="dataFieldName" value="total"/>
<set field="chartId" value="pieChartDiv"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="Chart Data">
<include-screen name="ChartDataList"/>
</screenlet>
<screenlet title="Flotr Pie Chart representing above data">
<include-screen name="FlotrChart" location="component://common/widget/flotrScreens.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="BarChart">
<section>
<actions>
<set field="headerItem" value="Barcharts"/>
<entity-condition entity-name="ExampleCountByType" list="chartData">
<order-by field-name="exampleTypeId"/>
</entity-condition>
<set field="chartType" value="Bars"/>
<set field="labelFieldName" value="exampleTypeId"/>
<set field="dataFieldName" value="total"/>
<set field="chartId" value="barChartDiv"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="Chart Data">
<include-screen name="ChartDataList"/>
</screenlet>
<screenlet title="Flotr Bar Chart representing above data">
<include-screen name="FlotrChart" location="component://common/widget/flotrScreens.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>