The OOoChart allows to make graphics. The data of the graph comes from a listbox.
Table of Contents
It is necessary to create a form with a ListBox. In this example, the List Method
of this listbox is a SQLMethod :
count(uid) as owner_count ,
count(reference) as number_count
group by owner
order by owner_count DESC
Now we can create a OOoChart. A OOoChart widget is added in ERP5 Forms. You have
to select one ERP5 Form in the Zope Management Interface (ZMI). Then you have on
the top right a list of widget that you might add. Please, select a 'OOoChart'.
Here we will define only a few fields, the strict necessary to get a graphic.
It will be displayed on the top of the OOoChart. You can put any string, it is
intended to explain to the user what is the content of your chart.
It is simply the ID of the ERP5 Form containing the listbox. If left empty, the
form containing the OOoChart will be used.
It is the ID of the ListBox in it's form, usually it is 'listbox'. If left empty,
it defaults to "listbox".
This describes what are the columns use to make the graph. Data of these columns must be calculated. It should be entered like this :
owner_count | Document Count
number_count | Number Count
This is of the form : [property or method] | [Label displayed to the user]. You can put as many columns as you want.
This describes what are color of the columns.It should be entered like this:
owner_count | #406f0f
number_count | #34bac9
This is of the form : [property ] | [HTML code color]. You must put the same
columns ID that in the field: User Column ID List. More information on HTML
code color here: http://en.wikipedia.org/wiki/HTML_color_names.
If this property don't fill in, Data Color choices are delegated to OOo.org
The other field in OOoChartWidget are the properties of the three chart, or improve the chart appearance.
You can choose between three graph: a pie chart, a bar graph or a line graph.
Each graph have their own properties or common properties. By default it's a bar graph.
You can choose between vertical or horizontal: It's only a property for bar chart. If you choose horizontal, then bars are drawn along the horizontal axis from left to right and inversely. By default it's vertical
If these checkboxes are checked, you will see the Legend, the Title and the grid.
You can choose the Legend position relatively to the graph. There are 'top', 'right', 'left', 'bottom'. By default the legend is to right in relation to the graph.
This attribute tells whether you want grid lines at major intervals only (major), or minor intervals (minor)
This property tells whether bars are stacked or side-by-side (default)
he 'connect-bars' attribute is only used for stacked bars; it draws lines connecting the various levels of bars.
Render the chart in three dimensions rather in flat mode
This property is in connection with 3D property. If you want extra depth on the chart, you may set the deep attribute to true as well
break apart or stick the sectors of a pie chart. You must put an integer between 0 and 10. 0 for stick sectors and 10 for break apart sectors.
The 'connect-bars' attribute is only used for stacked bars; it draws lines connecting the various levels of bars
This attribute is check if a bar chart has lines on it as well.
If your source data has its data series in rows instead of columns, set this attribute to 'rows' instead of the default 'columns'.
Is the data labeled with the value, a percentage, or none (the default)
Should all data points have a text label (the name of the corresponding series) and/or the legend symbol next to them?