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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user