The OOoChart allows to make graphics. The data of the graph comes from a listbox.
Table of Contents
Minimum Configuration¶
Step 1¶
It is necessary to create a form with a ListBox. In this example, the List Method
of this listbox is a SQLMethod :
select
count(uid) as owner_count ,
owner,
count(reference) as number_count
from catalog
group by owner
order by owner_count DESC
Step 2¶
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'.
OOoChart configuration¶
Here we will define only a few fields, the strict necessary to get a graphic.
Title¶
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.
ListBox Form ID¶
It is simply the ID of the ERP5 Form containing the listbox. If left empty, the
form containing the OOoChart will be used.
ListBox ID¶
It is the ID of the ListBox in it's form, usually it is 'listbox'. If left empty,
it defaults to "listbox".
User Column ID List¶
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.
Data Color¶
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
Full Configuration¶
The other field in OOoChartWidget are the properties of the three chart, or improve the chart appearance.
Chart type¶
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.
Bar Position¶
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
Chart Legend, Chart Title, Chart Grid¶
If these checkboxes are checked, you will see the Legend, the Title and the grid.
Legend Position¶
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.
Grid Size¶
This attribute tells whether you want grid lines at major intervals only (major), or minor intervals (minor)
Stacked Bars¶
This property tells whether bars are stacked or side-by-side (default)
Connect Bars¶
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
Deep¶
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
Sector Pie Offset¶
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.
Symbol Type¶
The 'connect-bars' attribute is only used for stacked bars; it draws lines connecting the various levels of bars
Lines Used¶
This attribute is check if a bar chart has lines on it as well.
Series Source¶
If your source data has its data series in rows instead of columns, set this attribute to 'rows' instead of the default 'columns'.
Data-Label-Number¶
Is the data labeled with the value, a percentage, or none (the default)
Data-Label-Text , Data-Label-Symbol¶
Should all data points have a text label (the name of the corresponding series) and/or the legend symbol next to them?
Related Articles¶